php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23504 Open_BASE_DIR is no longer working.
Submitted: 2003-05-06 02:08 UTC Modified: 2003-05-18 11:53 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:3 of 4 (75.0%)
Same Version:2 (66.7%)
Same OS:3 (100.0%)
From: ryza at deluxnetwork dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.3.2RC2 OS: Redhat Linux 7.3
Private report: No CVE-ID: None
 [2003-05-06 02:08 UTC] ryza at deluxnetwork dot com
OK

i host a few thousand sites so i use Open_base_dir for security.
every version of php since 4.2.2 no longer works

Please fix Open_base_dir!

ERROR DESCRIPTION:
when one site has open_base_dir enbaled it effects sites that dont have open_base_dir restrictions. (not all the time but it occurs).

SUMMARY:
every version of php that was released after 4.2.2 no longer works, dont bother upgrading.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-06 18:27 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2003-05-07 03:41 UTC] edink@php.net
And could it be a simple spelling error? Its open_basedir, not open_base_dir.
 [2003-05-07 03:52 UTC] ryza at deluxnetwork dot com
no its not a spelling error

i have this in my apache vhost
<virtualvhost foo>
php_admin_value open_basedir "/foo"
</virtualhost>


then when i access another vhost(which doesnt have open_base_dir restrictions) i get the error,

Warning: Unknown(): open_basedir restriction in effect. File(/foo/index.php) is not within the allowed path(s): (/foo) in Unknown on line 0

Warning: Unknown(/foo/index.php): failed to open stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening '/foo/index.php' for inclusion (include_path='.:/usr/local/php/lib/php') in Unknown on line 0
 [2003-05-07 04:20 UTC] edink@php.net
I cannot reproduce this problem on my RedHat Linux 6.2 test machine. Please post more details about your actual apache configuration, especially virtual host settings and errors you recieve.
 [2003-05-07 04:25 UTC] ryza at deluxnetwork dot com
it dosnt happen everytime u load the page

if i refresh a vhost a couple of times it occurs..

here is an example:
http://dcp.deluxnetwork.com
(user/pass = demo)
the above vhost does not have open_basedir but it still produces errors.

if it dosnt happen straight away then click reload.

here is the apache config:
http://203.45.200.219/httpd.conf
 [2003-05-07 04:56 UTC] edink@php.net
I've seen the warnings. Just to map out where the problem is could you try removing php_admin_value open_basedir from <Directory directive in put it into <VirtualHost?

 [2003-05-07 05:11 UTC] ryza at deluxnetwork dot com
done..
 [2003-05-07 06:01 UTC] edink@php.net
Might be related to http://bugs.php.net/bug.php?id=23462
I am not able to reproduce on my box with a simple 2 vhost configuration.
 [2003-05-07 06:34 UTC] edink@php.net
You should have recieved a patch by mail. Please let us know if it had helped with the problem.
 [2003-05-07 11:35 UTC] ryza at deluxnetwork dot com
patch made it even worse :(
error occurs everytime with patched version...
 [2003-05-08 01:11 UTC] ryza at deluxnetwork dot com
ok sorry ignore my previous message 
i was getting an error due to something i was doing wrong. *sign*

as far as i can tell the patch has fixed the problem without any side effects.

ill post again if problem occurs.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 14:00:02 2026 UTC