Hi,
I have a virtual host setup as follows:
<VirtualHost *:80>
ServerName www.domain.com
ServerAlias *.domain.com
DocumentRoot /home/domain.com
php_admin_value upload_tmp_dir "/tmp/php_upload"
php_admin_value open_basedir /home/domain.com/:/usr/local/lib/php
</VirtualHost>
/tmp/php_upload and /home/domain.com and on a different file system.
When performing a file upload the upload is successfully however the
following warning is displayed:
Warning: move_uploaded_file() [function.move-uploaded-file]:
open_basedir restriction in effect. File(/tmp/php_upload/phpsrRDr6) is
not within the allowed path(s): (/home/domain.com/:/usr/local/lib/php)
in /home/domain.com/upload_do.php on line 15
The setup runs PHP 5.2.10.
As the documentation defines the source path does not need be in
open_base_dir. The functionality is completing so it appears to being
abiding by this but the warning message is being displayed.
I believe the issue may reside in the function php_copy_file_ex.
php_copy_file_ex calls the function php_plain_files_stream_opener in
main/streams/plain_wrapper.c. php_plain_files_stream_opener calls the
open base check on the source path. It appears for some reason
STREAM_DISABLE_OPEN_BASEDIR may be being ignored?
Can someone shed some light on this.
Thanks
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php