PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

Bug #19292 random error: open_basedir restriction in effect. File is in wrong directory
Submitted:8 Sep 2002 10:54am UTC Modified: 7 Jan 2005 9:01am UTC
From:tnowak at triger dot com dot pl Assigned to:
Status:Closed Category:Apache related
Version:4.3.3RC4 OS:linux
Votes:180 Avg. Score:4.8 ± 0.7 Reproduced:149 of 154 (96.8%)
Same Version:97 (65.1%) Same OS:104 (69.8%)
View/Vote Developer Edit Submission

[8 Sep 2002 10:54am 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/'

[28 Sep 2002 11:36am 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
[2 Oct 2002 1:57am 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.
[16 Oct 2002 3:54am 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.
[11 Jan 2003 9:33pm 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
[15 Feb 2003 5:08pm 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.
[15 Feb 2003 5:10pm 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.5
12.2.10&ty=u

(should apply to 4.3.0 sources too)
[23 Feb 2003 4:39pm 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.

[2 Mar 2003 9:54pm 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).
[23 May 2003 10:14am UTC] sniper@php.net
In the other vhost, set open_basedir to none
[4 Oct 2003 12:53am UTC] sniper@php.net
See bug #25753 (placeholder for all these reports about leaking php ini
settings)

[28 Jan 2004 2:24pm UTC] sniper@php.net
This should now be fixed in CVS. Fix scheduled for PHP 4.3.5.

RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC