php.net |  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
Votes:180
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
 [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/'


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-28 11:36 UTC] rasmus@php.net
Could someone please check if this patch to 4.2.3 fixes this problem?

http://cvs.php.net/diff.php/php4/main/fopen_wrappers.c?login=2&r1=1.142.2.3&r2=1.142.2.4&ty=u
 [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] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

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] sniper@php.net
Patch can be found here:
http://cvs.php.net/diff.php/php4/main/main.c?login=2&r1=1.512.2.9&r2=1.512.2.10&ty=u

(should apply to 4.3.0 sources too)

 [2003-02-23 16:39 UTC] sniper@php.net
[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 http://bugs.php.net/bug.php?id=22480, as this seems to be connected somewhat, but more critical (php source disclosure).
 [2003-05-23 10:14 UTC] sniper@php.net
In the other vhost, set open_basedir to none

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


 [2004-01-28 14:24 UTC] sniper@php.net
This should now be fixed in CVS. Fix scheduled for PHP 4.3.5.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 22:01:29 2024 UTC