#19292 [Ctl]: random error: open_basedir restriction in effect. File is in wrong directory

From: Date: Fri, 11 Oct 2002 18:15:50 +0000
Subject: #19292 [Ctl]: random error: open_basedir restriction in effect. File is in wrong directory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22172@lists.php.net to get a copy of this message
 ID:               19292
 Updated by:       joerg@php.net
 Reported By:      tnowak@triger.com.pl
 Status:           Critical
 Bug Type:         Apache related
 Operating System: linux
 PHP Version:      4.2.3
 New Comment:

I can confirm the message from ck@php.net.

Same problem here on several linux boxes that servers a nummer of
virtual host. On some vhosts we have these error on every 2nd hit.

There is a chance that these kind of error not effected is to the first
vhost.

I have made a test with the latest 'php4-200210100000' with shows the
same behavior.

Realy weird is that the unkown error messages shows the WRONG settings
(open_basedir) for that vhosts.
Screenshot:
http://sgi.takenet.de/~beh/error.gif

They are 2 other things out there that apps that using pear(cache)
shows open_basedir restrictions too. But the pear directory is always
allowed.

The make install prozess from the php latest and php-4.3rc1 shows both


tng-web:/usr/src/php-4.3.0pre1 # make install
Installing PHP SAPI module
[activating module `php4' in /usr/apache/conf/httpd.conf]
cp libs/libphp4.so /usr/apache/libexec/libphp4.so
chmod 755 /usr/apache/libexec/libphp4.so
cp /usr/apache/conf/httpd.conf /usr/apache/conf/httpd.conf.bak
cp /usr/apache/conf/httpd.conf.new /usr/apache/conf/httpd.conf
rm /usr/apache/conf/httpd.conf.new
Installing shared extensions:    
/usr/lib/php/extensions/no-debug-non-zts-20020429/
Installing PHP CLI binary:        /usr/bin/
Installing PEAR environment:      /usr/lib/php/

Warning: file_exists() [http://www.php.net/function.file-exists]: SAFE
MODE Restriction in effect.  The script whose uid is 500 is not allowed
to access /root owned by uid 0 in
/daten/src/php-4.3.0pre1/pear/PEAR/Config.php on line 282

a lot of more warnings.
Screenshot:
http://sgi.takenet.de/~beh/error2.gif

We are not using any kind of caching software or other 3rd party
modules. And yes.. switching back to 4.2.1 solves all the problems
without making any changes on configfiles (php.ini , httpd.conf)


Previous Comments:
------------------------------------------------------------------------

[2002-10-10 08:43:37] sniper@php.net

Keep this at 'Critical' status.
(ck@php.net: Can you be a bit more specific? And did you test with PHP
4.3.0-dev there?)


------------------------------------------------------------------------

[2002-10-10 05:05:17] ck@php.net

Same here, yet only on one of four production boxes. Error randomly
pops up, and is gone after reloading (seems to be only one apache child
at a time is effected).

Seems like the error occurs for all functions using file i/o, mainly
include() in our case.

------------------------------------------------------------------------

[2002-10-09 13:13:09] rasmus@php.net

Could someone please check if this is still a problem in current CVS?

------------------------------------------------------------------------

[2002-10-05 19:28:45] wez@php.net

Keep it critical.

------------------------------------------------------------------------

[2002-10-05 10:43:37] list@firehawksystems.com

I just checked in a change to the open_basedir check.  I don't think it
is a fix for your problems, but it could be.  

Please try using this CVS snapshot on a non-production machine:

  http://snaps.php.net/php4-latest.tar.gz

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


Thanks,

Brian

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/19292

-- 
Edit this bug report at http://bugs.php.net/?id=19292&edit=1



Thread (107 messages)

« previous php.bugs (#22172) next »