ID: 39123
User updated by: phpbugs at thequod dot de
-Summary: upload_tmp_dir with trailing slash in open_basedir
causes uploads to fail
Reported By: phpbugs at thequod dot de
-Status: Bogus
+Status: Open
Bug Type: Safe Mode/open_basedir
Operating System: Ubuntu Linux
PHP Version: 5CVS-2006-10-11 (CVS)
New Comment:
I've changed the summary.
Long version:
Default for "upload_tmp_dir" has changed from "/tmp/"
to "/tmp" and uploads now fail with open_base_dir="/tmp/"!
This is a regression!
If I use "/tmp/" in open_base_dir, I expect it to also
handle accesses to the "/tmp" directory itself!
(all apart the fact that it's ridiculous to manually have
to add upload_tmp_dir to open_basedir for uploads to work)
Previous Comments:
------------------------------------------------------------------------
[2006-10-11 23:31:40] [EMAIL PROTECTED]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
Standard process for validating open_basedir applies here.
------------------------------------------------------------------------
[2006-10-11 01:44:07] phpbugs at thequod dot de
Description:
------------
I have no upload_tmp_dir set, so it seems to use "/tmp".
I have added "/tmp/" to open_basedir (despite the fact
that this was not necessary before - see
http://bugs.php.net/38934).
Upload in PHP_5_2 fails with:
[11-Oct-2006 03:26:35] PHP Warning: Unknown: open_basedir
restriction in effect. File(/tmp) is not within the
allowed path(s):
(/web7/:/var/www/web7/:/tmp/:/var/www/usr/local/share/php/:/usr/local/share/php/)
in Unknown on line 0
[11-Oct-2006 03:26:35] PHP Warning: File upload error -
unable to create a temporary file in Unknown on line 0
This is a regression to PHP_5_1, where it works like this!
Setting upload_tmp_dir=/tmp/ (with ending slash) fixes it
also for PHP_5_2.
Reproduce code:
---------------
Any upload form, there are two in the other bug refered above.
Expected result:
----------------
Upload works.
Actual result:
--------------
Upload does not work.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39123&edit=1