« Upgrading from Plesk 8.2 to 8.3Incorrect "open_basedir restriction in effect" »

14 comments

Comment from: Evgeny Fadeev [Visitor]
Evgeny FadeevI've used this method -

enclosing php_admin_flag safe_mode off into <Directory> directive.

to disable PHP safe_mode. and set open_basedir

Don't know why but disabling statement was ineffective in the main section of the httpd.conf

I use PHP 5.1.6/Apache/2.2.3 API version 20051115 (CentOS)
31/05/08 @ 20:34
Comment from: Jon [Visitor] Email
JonThanks, this was a big help! I didn't include the IfModule parts and it still worked, though I was trying to solve a slightly different problem with the basedir restriction. I created a symlink of an image folder to share between Plesk virtual hosts but it wouldn't let me use file_exists() on its contents. All I needed was to include the original file's path in the open_basedir list.
07/01/09 @ 09:41
Comment from: Rob [Visitor] Email
RobI have followed the steps above (I even remembered to restart the server on the second attempt ;-) but it has made no difference to the results (see below). I am using Plesk 8.

I tried adding ":/images:/properties" after "...:/tmp" in the following line:

"/var/www/vhosts/your.domain/httpdocs:.:/php:/tmp"

but that either doesn't work or didn't make any difference.

Is it possible to tell from the error code below what modifications might be necessary?

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/properties/thumb_39312380.jpg) is not within the allowed path(s): (/var/www/vhosts/mydomain.net.nz/httpdocs:/tmp) in /var/www/vhosts/mydomain.net.nz/httpdocs/property_list.php on line 191



Warning: imagejpeg() [function.imagejpeg]: Unable to open 'properties/thumb_39312380.jpg' for writing in /var/www/vhosts/mydomain.net.nz/httpdocs/images/Thumbnail.php on line 196

/properties/thumb_39312380.jpg" />


Thanks,

Rob
15/02/09 @ 01:51
Comment from: Rob [Visitor] Email
RobI spoke to my server provider support team and they fixed the open_basedir problem by replacing everything in the vhost.conf file with:

<directory /var/www/vhostsrenttoown.net.nz/httpdocs>
php_admin_value open_basedir none
php_admin_flag safe_mode 0
<Directory/>

Obviously most server setups are unique so I presume that's why this worked for me and your solution worked for you.

Cheers,

Rob
15/02/09 @ 09:41
Comment from: çiçekçi [Visitor] Email
çiçekçii wonder how can i change open basedir in my htacces file ?
16/02/09 @ 22:25
Comment from: David Newcomb [Member] Email
David NewcombBy using an editor?
17/02/09 @ 10:12
Comment from: Slavi [Visitor] Email
Slavi@Evgeny Fadeev
------
Don't know why but disabling statement was ineffective in the main section of the httpd.conf
------

It seems each /conf/httpd.include lists allowed directories for open basedir. That's done for each vhost.
27/11/09 @ 16:54
Comment from: çiçekçi [Visitor]
çiçekçiMany thanks
28/01/10 @ 16:23
Comment from: çiçekçi [Visitor]
çiçekçithanks for your comments...
11/03/10 @ 17:45
Comment from: toymaker [Visitor]
toymakerThanks!!! We recently upgraded our platform to Plesk 10 and this thread made my day :)
22/11/10 @ 16:51
Comment from: Tom [Visitor]
TomThanks, you solved my apache issue even though I was not using plesk.
09/01/11 @ 17:22
Comment from: Rich Mehta [Visitor]
Rich MehtaThat's a great tip. Fixed my subdomain problem straight away. Although I didn't restart the whole Apache server (I've got a few sites on the same box); I just ran

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=your.domain
20/06/11 @ 15:41
Comment from: Dave Cool [Visitor]
Dave CoolRestarting apache didn't seem to work for me for some reason, however Rich Mehta's tip did. The only problem was the websrvmng was "obsolete" so I had to use

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain your.domain
18/10/11 @ 04:09
Comment from: Eric Gillette [Visitor] Email
Eric GilletteYeah, this worked for me too on Plesk 8.6 by simply appending the appropriate directory (i.e. ./:/tmp:/var/tmp)

Then restarted the web server:

service httpd restart

Or for those of you without the service wrapper, try this:

/etc/init.d/httpd restart
26/01/12 @ 01:24

Leave a comment


Your email address will not be revealed on this site.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)