|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-08-09 16:56 UTC] wolfram at schlich dot org
Description:
------------
when safe_mode is active, I want to be able to include files from certain directories without checking for their UID/GID.
Reproduce code:
---------------
--8<--[ php.ini ]--8<--
safe_mode = On
safe_mode_gid = Off
safe_mode_include_dir = "/usr/share/php/:/usr/lib/php/"
safe_mode_allowed_env_vars = PHP_,LANG,LC_
--8<--[ apache vhost config ]--8<--
php_value include_path ".:/usr/share/php:/usr/lib/php"
--8<--[ sample php script ]--8<--
require_once('/usr/lib/php/Smarty/Smarty.class.php');
--8<--
Expected result:
----------------
included file, no error message.
Actual result:
--------------
Warning: main() [function.main]: SAFE MODE Restriction in effect. The script whose uid is 667 is not allowed to access /usr/lib/php/Smarty/Smarty.class.php owned by uid 0 in /home/wschlich/public_html/smartytest/smartytest.php on line 19
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 12:00:01 2025 UTC |
I can't reproduce this either. Try this on command line: # php -r 'include("/usr/lib/php/Smarty/Smarty.class.php");' Also, make sure that PHP really is loading the right php.ini file!! (e.g. if you happen to have one in / that one will be loaded instead)