ID: 36532 Updated by: [EMAIL PROTECTED] Reported By: amicka at gmail dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: FreeBSD 4.11 PHP Version: 4.4.2 New Comment:
Can you try it with Apache 1.3.x ? And I'd appreciate if you try to reproduce it with PHP 5.1 either. Previous Comments: ------------------------------------------------------------------------ [2006-02-27 09:43:47] amicka at gmail dot com Apache 2.0 (2.0.55) ------------------------------------------------------------------------ [2006-02-27 08:54:52] [EMAIL PROTECTED] What Server API are you using? ------------------------------------------------------------------------ [2006-02-26 03:11:35] amicka at gmail dot com Description: ------------ We are using mod_php and providing per-site configuration directives in httpd.conf I am testing with a phpinfo() file, owned by uid/gid 1000/1000 When safe_mode is enabled, we receive the following error: PHP Warning: Unknown(): SAFE MODE Restriction in effect. The script whose uid/gid is 0/0 is not allowed to access /www/example.com/tmp owned by uid/gid 1000/1000 in Unknown on line 0 PHP Warning: Unknown(): open(/tmp/sess_659835e0c801f8cfcf46c1740c026d08, O_RDWR) failed: Permission denied (13) in Unknown on line 0 PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 * Because my info.php file is owned by uid=1000, the "script whose uid/gid is 0/0" error SHOULD NOT APPEAR. It is erroneously using 0/0 for its checks * Because /www/example.com/tmp is in my safe_mode_include_dir path, the above error shouldn't apply anyway * Because my session.save_path is /www/example.com/tmp , it SHOUD NOT be attempting to write to /tmp My current workaround is to chown /www/example.com/tmp to 0:0, which is preferable in my environment. But this still indicates a bug. php.ini is similar to the ini-recommended file, plus safe_mode = On Per-site overrides: <VirtualHost *:80> ServerName www.example.com DocumentRoot /www/example.com/www SetEnv PHP_DOCUMENT_ROOT /www/example.com/www SetEnv PHPRC /www/example.com/conf php_admin_value doc_root /www/example.com/www </VirtualHost> <Directory /www/virtual/example.com/> php_admin_value session.save_path "/www/example.com/tmp/" php_admin_value upload_tmp_dir "/www/example.com/tmp/" php_admin_value safe_mode_include_dir "/www/lib/:/www/sharedlib/:/www/example.com/tmp/:/dev/null:/usr/local/lib/php/" php_admin_value open_basedir /www/lib/:/www/example.com/ </Directory> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36532&edit=1