|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19292 random error: open_basedir restriction in effect. File is in wrong directory
Submitted: 2002-09-08 10:54 UTC Modified: 2005-01-07 09:01 UTC
Avg. Score:4.8 ± 0.7
Reproduced:149 of 154 (96.8%)
Same Version:97 (65.1%)
Same OS:104 (69.8%)
From: tnowak at triger dot com dot pl Assigned:
Status: Closed Package: Apache related
PHP Version: 4.3.3RC4 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tnowak at triger dot com dot pl
New email:
PHP Version: OS:


 [2002-09-08 10:54 UTC] tnowak at triger dot com dot pl
After upgrade from 4.2.2 to 4.2.3 I have random error "open_basedir restriction in effect. File is in wrong directory" at all apache virtual servers (with open_basedir option and without).

Linux 2.2.21
 './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-EAPI' '--enable-track-vars' '--with-mysql=/usr/local/mysql' '--with-jpeg-dir' '--with-t1lib' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-trans-sid' '--with-zlib' '--enable-ftp' '--enable-yp' '--enable-memory-limit' '--with-gd' '--with-exec-dir' '--enable-sockets' '--enable-safe-mode' '--with-exec-dir=/usr/local/php/bin' '--with-pdflib=/usr/pdflib' '--with-imap' '--with-png-dir' '--with-gettext' '--with-openssl=/usr/openssl/'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-28 11:36 UTC]
Could someone please check if this patch to 4.2.3 fixes this problem?
 [2002-10-02 01:57 UTC] tnowak at triger dot com dot pl
I still have these random errors, but there is better with patch than without patch. I have about few errors per hour at the server with 1MB/s traffic.
 [2002-10-16 03:54 UTC] bin at entertainz dot co dot nz
Another update: This appears to be happening only to virtual hosts which do not have the admin flag open_basedir set.
 [2003-01-11 21:33 UTC] gregory at tiv dot net
I have 2 FreeBSD servers with the same problem. Both have /www as symlink. Real path is /home/www.
I also have a Windows machine, with no symlink ;-) - no problem there. /www is c:/www there, and all works.
All machines have same httpd.conf, same Apache, same 4.2.3
 [2003-02-15 17:08 UTC]
Please try using this CVS snapshot:
For Windows:

I fixed a bug that prevented resetting the open_basedir
by using 'php_admin_value open_basedir none'. 

This most likely fixes this problem for at least some of
you who have added comments to this report.

 [2003-02-15 17:10 UTC]
Patch can be found here:

(should apply to 4.3.0 sources too)

 [2003-02-23 16:39 UTC]
[david at ols dot es] submitted some patches which supposedly
fix some of the issues, so please try the latest snapshot from today.

 [2003-03-02 21:54 UTC] kaspars at fabrika dot lv
Please see bug, as this seems to be connected somewhat, but more critical (php source disclosure).
 [2003-05-23 10:14 UTC]
In the other vhost, set open_basedir to none

 [2003-10-04 00:53 UTC]
See bug #25753 (placeholder for all these reports about leaking php ini settings)

 [2004-01-28 14:24 UTC]
This should now be fixed in CVS. Fix scheduled for PHP 4.3.5.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Dec 05 10:01:26 2023 UTC