ID: 49810 Updated by: j...@php.net Reported By: php-dev at micallef dot fr -Status: Open +Status: Feedback Bug Type: Safe Mode/open_basedir Operating System: Solaris 10 PHP Version: 5.2.11 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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