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

9 comments

Comment from: Evgeny Fadeev [Visitor]
I'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)
05/31/08 @ 20:34
Comment from: Jon [Visitor]
Email · http://jonathandean.com
Thanks, 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.
01/07/09 @ 09:41
Comment from: Rob [Visitor]
Email · http://www.robyallop.com
I 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
02/15/09 @ 01:51
Comment from: Rob [Visitor]
Email · http://www.robyallop.com
I 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
02/15/09 @ 09:41
Comment from: çiçekçi [Visitor]
Email · http://www.cicekclub.com
i wonder how can i change open basedir in my htacces file ?
02/16/09 @ 22:25
Comment from: David Newcomb [Member]
Email
By using an editor?
02/17/09 @ 10:12
Comment from: Slavi [Visitor]
Email · http://devcha.com
@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.
11/27/09 @ 16:54
Comment from: çiçekçi [Visitor]
· http://www.nettencicek.com
Many thanks
01/28/10 @ 16:23
Comment from: çiçekçi [Visitor]
· http://www.cicekdiyari.com
thanks for your comments...
03/11/10 @ 17:45

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
Please enter "notspam" (without the quotes) in the box below
antispam test