Educating the world

Our blog has over 10,000 readers a month

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


Comment from: Evgeny Fadeev [Visitor]
Evgeny Fadeev

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)

31/05/08 @ 20:34
Comment from: Jon [Visitor]  

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.

07/01/09 @ 09:41
Comment from: Rob [Visitor]  

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:


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/ in /var/www/vhosts/ on line 191

Warning: imagejpeg() [function.imagejpeg]: Unable to open ‘properties/thumb_39312380.jpg’ for writing in /var/www/vhosts/ on line 196

/properties/thumb_39312380.jpg” />



15/02/09 @ 01:51
Comment from: Rob [Visitor]  

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/>
php_admin_value open_basedir none
php_admin_flag safe_mode 0

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



15/02/09 @ 09:41
Comment from: šišekši [Visitor]  

i wonder how can i change open basedir in my htacces file ?

16/02/09 @ 22:25
Comment from: davidnewcomb [Member]  

By using an editor?

17/02/09 @ 10:12
Comment from: Slavi [Visitor]  

@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]

Many thanks

28/01/10 @ 16:23
Comment from: šišekši [Visitor]

thanks for your comments…

11/03/10 @ 17:45
Comment from: toymaker [Visitor]

Thanks!!! We recently upgraded our platform to Plesk 10 and this thread made my day :)

22/11/10 @ 16:51
Comment from: Tom [Visitor]

Thanks, you solved my apache issue even though I was not using plesk.

09/01/11 @ 17:22
Comment from: Rich Mehta [Visitor]
Rich Mehta

That’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 Cool

Restarting 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]  
Eric Gillette

Yeah, 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
Comment from: prekast [Visitor]

thank you admin

10/07/12 @ 08:26
Comment from: masoud [Visitor]

excuse me
does anybody have same problem in windows

what is the solution for IIS server

18/11/12 @ 11:13
Comment from: ┴lvaro G. Vicario [Visitor]
┴lvaro G. Vicario

include_path has nothing to do with open_basedir (or security). I don’t think there’s a manual page that suggests the opposite.

25/04/13 @ 08:43
Comment from: davidnewcomb [Member]  

@Álvaro, That may be true but like I said in the article I worked it out using trial and error.
This article is about Plesk systems and they often do unpredictable things which is probably why this article is one of my most popular blog entries.

26/04/13 @ 10:19
Comment from: izmir tabela [Visitor]
izmir tabela

thank you admin

01/10/14 @ 06:26

Leave a comment

Your email address will not be revealed on this site.

Your URL will be displayed.
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)