|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-27 21:03 UTC] felipe@php.net
-Status: Open
+Status: Feedback
[2010-04-27 21:03 UTC] felipe@php.net
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
Description: ------------ I have this vhost settings: <Location /> php_admin_value open_basedir /home/data/site.org/tmp/:/home/web/site.org/ php_admin_value doc_root /home/web/site.org/ php_admin_value upload_tmp_dir /home/data/site.org/tmp/ </Location> doing a move_uploaded_file to the upload_tmp_dir result in a failure: PHP Warning: move_uploaded_file(): open_basedir restriction in effect. File(/home/data/site.org/tmp/FLOSG5_new.000) is not within the allowed path(s): (/home/data/site.org/tmp/:/home/web/site.org/) in /home/web/site.org/fileupload.php on line 11 In the same error string is visible that the upload_tmp_dir path is in the open_basedir directive. I'm on a debian VM with linux 2.6.18 kernel, the /home dir is mounted via NFS and apache is chrooted with mod_chroot. Test script: --------------- Any simple upload script with these lines of code: [...] $from = $_FILES['uploadedfile']['tmp_name']; $flog = ini_get('upload_tmp_dir').$_FILES['uploadedfile']['name']; move_uploaded_file($from,$flog); [...]