View Full Version : open_basedir variable

10-18-2004, 02:49 PM

I'm really torqued off at this variable in my php.ini! :D

According to phpinfo() it is set this way:

/home/httpd/vhosts/domainhere/httpdocs:/tmp off

The "Local Variable" is /home/httpd/vhosts/domainhere/httpdocs:/tmp
and the "Master Variable" is "off".

I'm on a Red Hat 9.0 box running Plesk 7.1 reloaded control panel and Zend Optimizer... I'm running into open_basedir errors when trying to install my billing package (Modernbill).

I've done a "locate" for php.ini and changed every open_basedir to ;open_basedir.

Somehow - the "local" is still getting set. Any thoughts? Could Zend or Plesk be overriding?

Is there a command I can run to find /home/httpd/vhosts/domainhere/httpdocs:/tmp in a file somewhere... I tried grep /home/httpd/vhosts/domainhere/httpdocs:/tmp but it has yet to come up with anything.

Help! :-)

10-19-2004, 04:07 AM
Plesk :D

If you installed Zend optimzer yourself then your real php.ini may well turn up in /usr/local/Zend/etc/php.ini & your /etc/php.ini may well be a symlink to that. ( phpinfo() output will tell you where your php.ini should be , cd to that directory and $> ls -al to see if it is indeed a symlink)

The open_basedir path you note is 2 paths , not 1 , the colon is the seperator so your open basedir paths are


but with plesk the open_basedir restrictions are mostly set in the httpd.include files

/etc/httpd/conf/httpd.include (global)
/home/httpd/vhosts/@domain@/conf/httpd.include (per domain)

so if your application is being installed globally (for all users) then look into the /etc/httpd/conf/httpd.conf , if per domain then you need to look at them all !

10-19-2004, 03:05 PM
Thanks... Plesk is trouble! I'm beginning to not like it much! :-)

Anyhow - I figured out that by leaving off " " around the dir helped.

In fact - I made a vhost_ssl.conf in the conf/ directory. In it I made the basedir / otherwise my billing module wouldn't work right.

Hopefully this isn't a huge security issue for just this domain?