php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #29856 open_basedir "/" not working
Submitted: 2004-08-26 20:15 UTC Modified: 2004-09-14 13:45 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: petrus at activesec dot biz Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.8 OS: Solaris 8
Private report: No CVE-ID: None
 [2004-08-26 20:15 UTC] petrus at activesec dot biz
Description:
------------
This bug report is similar to a solved one (bugid=22220), but looks like the bug appears again in version 4.3.8:

I just upgrade PHP from version 4.3.4 to version 4.3.8. After upgrade from 4.3.4 to 4.3.8 open_basedir "/" directive stop working (just like if I comment it out, no effect at all)

The Web server provides hosting for several domains, all of those with its own homedir:

<VirtualHost *:* >
        ServerName www.<servername>.com
        ServerAlias <servername>.com
        DocumentRoot /domains/<servername>.com/web
        php_admin_value open_basedir /domains/<servername>.com/web:/tmp
        php_admin_flag safe_mode Off
        php_admin_flag register_globals On
</VirtualHost>


where open_basedir restric PHP to the homedir. Some especial directories, for example the webmail directory, is there only one, but it is shared by all the virtualhosts (http://<virtualhost>/webmail/). I achieve that using (en
httpd.conf):

Alias /webmail "/apache2/htdocs/horde/imp"
<Directory /apache2/htdocs/horde >
       php_admin_flag safe_mode off
       php_admin_value upload_tmp_dir /tmp
       php_admin_value open_basedir "/"
</Directory>

This worked fine until the upgrade. After it, I get a message claiming that the open_basedir directive is in use, and that "/apache2/htdocs/horde/imp" is not in (/).

PHP.ini has no open_basedir tag, al are in apache conf. files using "php_admin_value".

None of the configuretion file were changes durring the upgrade. After downgrade to 4.3.4 again the problem desapeared.

4.3.8 configure line:

./configure --with-mysql --with-gd --with-apxs2=/apache2/bin/apxs --with-ldap --sharedstatedir=/tmp --enable-memory-limit=yes --enable-debug=no --with-zlib --with-kerberos=no --prefix=/usr/local/chroot/www/usr/local --with-gettext --with-xml --with-imap=../imap-2002e --without-imap-ssl  --with-openssl=/usr/local/ssl --with-jpeg-dir=/usr/local --with-config-file-path=/apache2/conf --enable-ftp=shared



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-30 19:08 UTC] petrus at activesec dot biz
Finally, after reading some mail from mailing lists and some try and error, I found that:

   open_basedir none

is equal to

   open_basedir "/"

and "/" has no effect at all.

Nevertheless in the documentation is no reference to the especial "none" parameter.
 [2004-08-31 08:18 UTC] derick@php.net
Marking it as a doc problem then.
 [2004-09-14 13:45 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"In httpd.conf, open_basedir can be turned off (e.g. for some virtual hosts) the same way (link to http://www.php.net/manual/en/configuration.php) as any other configuration directive with 'php_admin_value open_basedir none'."

I wonder why "/" doesn't work. Moreover with the aspect it worked before.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Aug 01 11:00:02 2025 UTC