#49810 [Fbk->Bgs]: safe_mode uid/gid are always 0/1024
| From: | srinatar@php.net | Date: | Mon, 19 Oct 2009 17:12:07 +0000 |
| Subject: | #49810 [Fbk->Bgs]: safe_mode uid/gid are always 0/1024 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-143703@lists.php.net to get a copy of this message | ||
ID: 49810
Updated by: srinatar@php.net
Reported By: php-dev at micallef dot fr
-Status: Feedback
+Status: Bogus
Bug Type: Safe Mode/open_basedir
Operating System: Solaris 10
PHP Version: 5.2.11
New Comment:
this is not a php bug. i recommend closing this as bogus.
i have heard this issue from some of my other customers using cool
stack
as well. it turns out that apache in cool stack is compiled with -
D_FILE_OFFSET_BITS=64 and php is not compiled with this similar flags.
when one uses -D_FILE_OFFSET_BITS=64, stat file structure size used
with
both apache as well as php's apache sapi module is different. hence,
you
are running into this issue.
this issue is already reported in cool stack forum multiple time.
please
check out their new version known as web stack under
http://www.sun.com/webstack and this should address your
concern.
Previous Comments:
------------------------------------------------------------------------
[2009-10-19 15:07:45] jani@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2009-10-08 08:48:12] php-dev at micallef dot fr
Description:
------------
Hello,
We have a Sparc T2000 with coolstack for apache (v2.2.9) and php
5.2.11.
When I activate safe_mode, we have this error :
Warning: Unknown: SAFE MODE Restriction in effect. The script whose
uid/gid is 1/1024 is not allowed to access /david/SHERPA/index.php owned
by uid/gid 1024/512 in Unknown on line 0
Warning: Unknown: failed to open stream: Permission denied in Unknown
on line 0
Fatal error: Unknown: Failed opening required '/test/php/index.php'
(include_path='.:/opt/php-5.2.11/includes') in Unknown on line 0
I suppose that de problem come with function php_getuid and
php_getgid.
I have done same test on RHEL_5 and I haven't any problem.
Do you have a idea ?
Reproduce code:
---------------
<?php
//echo "teste";
echo "uid = " . getmyuid() . "\n";
echo "gid = " . getmygid() . "\n";
//echo file_get_contents('/etc/passwd');
//echo file_get_contents('test.txt');
//phpinfo();
?>
Expected result:
----------------
Warning: Unknown: SAFE MODE Restriction in effect. The script whose
uid/gid is 1/1024 is not allowed to access /david/SHERPA/index.php owned
by uid/gid 1024/512 in Unknown on line 0
Warning: Unknown: failed to open stream: Permission denied in Unknown
on line 0
Fatal error: Unknown: Failed opening required '/test/php/index.php'
(include_path='.:/opt/php-5.2.11/includes') in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49810&edit=1