|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-19 15:07 UTC] jani@php.net
[2009-10-19 17:12 UTC] srinatar@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 03:00:01 2025 UTC |
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