Warning: open_basedir restriction in effect. File is in wron

Metalifloyd
Metalifloyd's picture

Joined: 2002-09-24
Posts: 2
Posted: Tue, 2002-09-24 22:05

I just installed Gallery 1.3.1 on my web server. The server is using PHP Version 4.0.6 and Apache/1.3.19. I have read FAQ C about this error and am pretty certain the open_basedir is correct. This is the same open_basedir format I use for other vhosts and they are able to run a variety of php applications without a problem. I also applied a chmod 777 to albums and even the tmp dir. The configuration tool did not give me any errors until I went to save and that is when I got the open_basedir error. Is there anything else I could try to get this script to work? I am eager to try this script out myself. The sample sites look incredible. I really appreciate your help on this.

Below is the exact error received...

Warning: open_basedir restriction in effect. File is in wrong directory in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/platform/fs_unix.php on line 53

Warning: fopen("/home/httpd/vhosts/dirtywhiteboyz.com/httpdocs/gallery/albums/.users/.htaccess","w") - Operation not permitted in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/platform/fs_unix.php on line 53

Warning: Supplied argument is not a valid File-Handle resource in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/classes/gallery/UserDB.php on line 48

Warning: Supplied argument is not a valid File-Handle resource in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/classes/gallery/UserDB.php on line 49

Warning: open_basedir restriction in effect. File is in wrong directory in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/platform/fs_unix.php on line 53

Warning: fopen("/home/httpd/vhosts/dirtywhiteboyz.com/httpdocs/gallery/albums/.users/userdb.dat.lock","a+") - Operation not permitted in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/platform/fs_unix.php on line 53
Error: Could not open lock file (/home/httpd/vhosts/dirtywhiteboyz.com/httpdocs/gallery/albums/.users/userdb.dat.lock)!
Warning: open_basedir restriction in effect. File is in wrong directory in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/platform/fs_unix.php on line 53

Warning: fopen("/home/httpd/vhosts/dirtywhiteboyz.com/httpdocs/gallery/albums/.users/1032904295:1559278487.lock","a+") - Operation not permitted in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/platform/fs_unix.php on line 53
Error: Could not open lock file (/home/httpd/vhosts/dirtywhiteboyz.com/httpdocs/gallery/albums/.users/1032904295:1559278487.lock)!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-09-25 03:48
Quote:
Warning: fopen("/home/httpd/vhosts/dirtywhiteboyz.com/httpdocs/gallery/albums/.users/.htaccess","w") - Operation not permitted in /var/www/vhosts/dirtywhiteboyz.com/httpdocs/gallery/platform/fs_unix.php on line 53

Ok. Check your open_basedir setting in the PHP diagnostic (linked from the config wizard) and see if "home/httpd/vhosts/dirtywhiteboyz.com/httpdocs/gallery/albums" is within the restricted list. If not, you'll have to resolve this.

My guess is that it isn't; I've never seen PHP be wrong about this.

 
Metalifloyd
Metalifloyd's picture

Joined: 2002-09-24
Posts: 2
Posted: Wed, 2002-09-25 20:45

Ok I found the problem. For the open_basedir setting in httpd.conf I had "/home/httpd/vhosts/dirtywhiteboyz.com/httpdocs" which is correct, however it is actually a symlink for "/var/www/vhosts/dirtywhiteboyz.com/httpdocs". I changed the open_basedir setting to the latter and now it is working. Not sure why that matters but apparently it does.

Well so far this script is great. A big thank you to all the developers and another thank you to bharat for your help in this.

-Metalifloyd