"Illegal Argument - invalid copyarea root path" while trying to create view in ClearCase Remote Client - clearcase-remote-client

$subj error appears after pressing "Finish" on new view creation dialog. The path looks absolutely valid.

The error is caused by .copyarea.dat (and perhaps .copyarea.db) files on the same or higher directory level where you want to create the view. It looks like a protection from nested views, but if you created the file in your $HOME (accidentally, or for backup purposes), you're out of luck.

You cannot create a CCRC view in $HOME:
As mentioned in "About the CCRC .ccase_wvreg file":
ClearCase Remote Client creates and stores a file local to each CCRC client named .ccase_wvreg (web view registry) in the user's home directory.
When the first view is created using CCRC, this file stores the local path to the view root (copy area) for each CCRC view on the system for a given user.
So trying to create a view, which would contain the "view registry" of all your view is... not possible.
After creation of a view from CCRC, the .ccase_wvreg file is stored under:
On Windows:
C:\Documents and Settings\<username> where <username> is the actual user name who created the view or the path that is extrapolated from the environment variable %USERPROFILE% (this path may be local or remote).
On UNIX/Linux:
/export/home/<username>, which is the user's home directory that created the view or the path as indicated by cd’ing to ~<username>.

Related

Virtual Directory in IIS and sql server filetables

I have an ASP.NET MVC application and which has two virtual directories. The first one (let's name it FirstDir) references some folder on the server (for example C:\SomeDir).
I connect to a MS SQL Server Database. This database has a Filetable named MyFiles. I can explore the directory of table MyFiles in Windows Explorer by path \\sql-server-instance-name\mssqlserver\MyData\MyFiles. It contains files stored in table MyFiles.
The second virtual directory (SecondDir) in my app references MyFiles tabe's directory (\\sql-server-instance-name\mssqlserver\MyData\MyFiles) because I would like to use files stored in this table directly from my ASP.NET application.
Then I write the following markup:
<!--Here I retrieve the image from first virtual dir, i.e. from file system-->
<img src="/SiteName/FirstDir/first.png" />
<!--And here I get the image from second virtual dir, i.e. from FileTable-->
<img src="/SiteName/SecondDir/second.png" />
The image in first img was loaded correctly. But the second image wasn't loaded (error 500.19).
Is it possible to get images from FileTable's directory in browser?
UPDATE:
I can load image from filetable in browser by UNC-path (like this: \\sql-server-instance-name\mssqlserver\MyData\MyFiles\first.png)
but I can not to use this path as src in img-tag (message in browser's console: 'Not allowed to load local resource' )

Display 'index of' page for images instead of 404 error

Using WAMP server (apache), if I put http://localhost:8080/website/img/ in the
browser address bar and there is no index.html file in there I get an automated list of the linked (image) files in that directory:
Index of /website/img/
Parent Directory
IMG1.jpg
IMG2.jpg
IMG3.jpg
This is using the default install of WAMP.
When I try the same thing on a remote site I have (hosted on GoDaddy w. Linux) I get a 404 (Page Not Found) Error, as you would expect I guess.
Is someone able to point me towards the way I can replicate the effect I get on my local machine on the remote site so the user is shown a similar crude list of images (or whatever) rather than a 404 error?
Thanks in advance.
it's because godaddy protect your folders by adding a .htaccess file inside them,if this file exists in your folder of img delete it and it will display the same thing as in localhost.
Preventing Directory Listing
Do you have a directory full of images or zips that you do not want people to be able to browse through? Typically a server is setup to prevent directory listing, but sometimes they are not. If not, become self-sufficient and fix it yourself:
IndexIgnore *
The * is a wildcard that matches all files, so if you stick that line into an htaccess file in your images directory, nothing in that directory will be allowed to be listed.
On the other hand, what if you did want the directory contents to be listed, but only if they were HTML pages and not images? Simple says I:
IndexIgnore *.gif *.jpg
This would return a list of all files not ending in .jpg or .gif, but would still list .txt, .html, etc.
And conversely, if your server is setup to prevent directory listing, but you want to list the directories by default, you could simply throw this into an htaccess file the directory you want displayed:
Options +Indexes
If you do use this option, be very careful that you do not put any unintentional or compromising files in this directory. And if you guessed it by the plus sign before Indexes, you can throw in a minus sign (Options -Indexes) to prevent directory listing entirely--this is typical of most server setups and is usually configured elsewhere in the apache server, but can be overridden through htaccess.
If you really want to be tricky, using the +Indexes option, you can include a default description for the directory listing that is displayed when you use it by placing a file called HEADER in the same directory. The contents of this file will be printed out before the list of directory contents is listed. You can also specify a footer, though it is called README, by placing it in the same directory as the HEADER. The README file is printed out after the directory listing is printed.
Read this :http://www.javascriptkit.com/howto/htaccess11.shtml
Make a text file on your computer called "htaccess.txt"
Add this one line to it:
Options +Indexes
Save the file then upload to the folder you want to see the files in.
Once it is uploaded, rename the file to ".htaccess".
You will now be able to view all the files in that folder.
Be careful what you put in that folder!

How to convert Reserved check-out to unreserved check-out using CCRC 7.1.2 win version

How can I change checkout type from Reserved to Unreserved ?
I am working in Windows environment and I am using CCRC 7.1.2
Through the CCRC version tree view, you should be able to select properties on the checked out version, and see a reserved checkout tick that you can un-tick.
(That specific screenshot is just an example, and has no checked out version in it)
But you must be in the right view, as the right user, ie as the user who checked out that file.
If this is unavailable in 7.1.2, or if you are not the right user in the right view, then report to the IBM technote "How to convert a reserved checkout or force the uncheckout of a file that was checked out from CCRC".
This is done on the CCRC server, where a full ClearCase is installed (ie, cleartool is available).
TO UNRESERVE A RESERVED CHECKOUT (recommended approach)
The unreserve command can be performed by an Administrator or Root on the back end storage of the user’s web view. First determine the view in question by executing “cleartool lsview” on the server, which will display the web views like this:
viewtag hostname:CC:\ccweb\{USERNAME}\{END USER’S VIEW}\view.stg
An administrator can then convert the previously reserved checkout to unreserved as follows:
cleartool unreserve -view hostname:C:\ccweb\{USERNAME}\{END USER’S VIEW}\view.stg C:\ccweb\{USERNAME}\{END USER’S VIEW}\{VOBTAG}\directory\filename
cleartool: Warning: This tool should not be used to access a Web View. All access to a Web view should be via the Web interface. Changes in the view's server side state will not be reflected in the client
Changed checkout to unreserved for "`:\ccweb\{USERNAME}\{END USERS VIEW}\{VOBTAG}\directory\filename`" branch "`\main`".

Notice (8): session_start() at CakePHP 2.2

Randomly, from time to time, when i load a page it shows this error:
Notice (8): session_start(): ps_files_cleanup_dir: opendir(C:\Windows\TEMP) failed: No such file or directory (2) [CORE\Cake\Model\Datasource\CakeSession.php, line 615]
Im using CakePHP 2.2.
What is going on here??
There is a session garbage collector in PHP that has a probability of executing whenever a PHP site is accessed. This is defined in php.ini by:
session.gc_probability
session.gc_divisor
session.gc_maxlifetime
session.save_path
http://www.php.net/manual/en/session.configuration.php
You have a gc_probability/gc_divisor chance that the sess_<PHPSESSID> files located in the save_path are deleted if they are older than gc_maxlifetime.
By default session.save_path is set to C:\Windows\Temp on Windows servers. I would suspect this almost always exists.
You need to give whatever account is executing the PHP script (IUSR by default if we're talking IIS) the "List folder" privilege under Advanced Security. This privilege is used by PHP to list the files in C:\Windows\Temp (or whatever location you have configured) to determine the actual names of the sess_<PHPSESSID> that it needs to parse through. It'll then go through each one of these files and if the modified date is older than maxlifetime it will delete the file. It has all the permissions it needs by default except list folders. Strangely enough IIS_IUSRS (a group used for application pools I believe) is granted this privilege, but not IUSR.
If you're curious IUSR is able to create those sess_<PHPSESSID> files because "Users" is granted the traverse folder permission and create file permission (it never does a list operation up to this point). It appears that IUSR is an unspoken member of either Authenticated Users or the Users group from testing performed here. There's also a special "CREATOR OWNER" permission set that gives owners full permissions of the files they create. This is where IUSR gets the privilege to actually delete the file. It's a bit convoluted but the only thing you should have to worry about is 'List folder'.
Seems like the directory for saving session files is set to a non-existent directory in your php.ini. So either create the directory it complains about or specify another directory for session.save_path php config.
You can change session save path in cackphp at Config/core.php.
check following comment in that file.
* The built in defaults are:
*
* - 'php' - Uses settings defined in your php.ini.
* - 'cake' - Saves session files in CakePHP's /tmp directory.
* - 'database' - Uses CakePHP's database sessions.
* - 'cache' - Use the Cache class to save sessions.
*
* To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
* Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
*
* To use database sessions, run the app/Config/Schema/sessions.php schema using
* the cake shell command: cake schema create Sessions
*
*/
Configure::write('Session', array(
'defaults' => 'cake'
));

Cakephp loads old database config file

I developed a small cakephp website on local machine. When I upload to my host server, I realize that I must use their prefix for the database name and database user. So, I go and create new database name and new user. When I visit the site, it has this:
Warning (2): mysql_connect() [function.mysql-connect]: Access denied for user 'old_name'#'localhost' (using password: YES) [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 552]
I am 100% sure, I already change the name to "new_name", it runs on my local machine, but I dont know why it still load the old name. I go to ftp, and download the database config file, it clearly stated that, the database user is "new_name", i dont understand why when I go to the site, it loads the old database config. I am new to cakephp, please help.
try to clear the files from your app/tmp directory and tripple check the configuration.
Sometimes it can take a while for files to become live. One host I use has a folder for upload and then they transfer to the live folder from there automatically. Could it be something like this?
You possibly need to specify an IP for the database instead of localhost. Often the database is hosted on a different server to the code.

Resources