ID:               12683
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Apache related
 Operating System: Solaris 5.8
 PHP Version:      4.0.6
 New Comment:

Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.




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

[2001-08-09 20:49:01] [EMAIL PROTECTED]

In PHP 4.0.6 (and 4.0.5) using apache with mod_perl and php4 compiled
in (statically), safe mode denies access to all files, believing that
it is running as UID 1 [basically this is like bug # 7744 ].

Recompiling apache and leaving out mod perl, allows the php pages to be
accessed with safe mode. Not running with safe mode while mod_perl is
compiled in, allows the php pages to be accessed. Only when mod_perl is
compiled in and safe mode is running does every single page (even a
simple phpinfo() or something with a single print() ) returns the
following (this was a request for "/test.php"):

[08-Aug-2001 13:00:11] PHP Warning:  SAFE MODE Restriction in effect. 
The script whose uid is 1 is not allowed to access /var/htdocs/test.php
owned by uid 0 in Unknown on line 0
[08-Aug-2001 13:00:11] PHP Warning:  Failed opening
'/var/htdocs/test.php' for inclusion
(include_path='.:/usr/local/lib/php') in Unknown on line 0

Granted root owns it in the above example, but it does not matter if
the uid is that of me, the webserver, or someone else. Note that the
original request is for test.php. As no includes, system calls, etc...
are done in test.php, it should work regardless of who actually owns
that file.

It seems to be looking for an owner uid of 1. I tried putting some
printf's in the code and it seems that the stat struct that is returned
from sapi_get_stat() - I think the one directly from the apache
"request" object - is messed up. It always has a uid of 1, a size of 0,
and a inode of 0.

Mod perl is before php in the activate-modules directives given when
building apache, and it shows up above php when running "httpd -l". If
I didn't know any better, I'd think this was a perl bug, but it is php
that isn't working.


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


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

Reply via email to