PHP4: 4.3.2
Likewise, my intention is to restrict the user within
'/home/ahank/public_html' when using fopen(), but allow the user to use
include() on files in '/usr/local/share/wl'. Here is my VirtualHost
config:
php_admin_flag register_globals Off
php_admin_flag safe_mode On
php_admin_flag safe_mode_gid On
php_admin_value include_path /usr/local/share/wl
php_admin_value safe_mode_include_dir /usr/local/share/wl
php_admin_value open_basedir /home/ahank/public_html
However, I get this error when loading a page which includes files in
this shared directory:
Warning: main(): open_basedir restriction in effect.
File(/usr/local/share/wl/hahaha.php) is not
within the allowed path(s): (/home/ahank/public_html) in
/home/ahank/public_html/test.php on line 3
Warning: main(hahaha.php): failed to open stream: Operation not
permitted in /home/ahank/public_html/test.php on line 3
Warning: main(): Failed opening 'hahaha.php' for
inclusion (include_path='/usr/local/share/wl') in
/home/ahank/public_html/test.php on line 3
It would seem that 'safe_mode_include_dir' has nothing to do with
'open_basedir'. Is there an equivalent to 'open_basedir_include_dir'
which will allow one to only interpret files by way of
include/require?
- hank
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php