ID:               39575
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ch at hoffie dot info
-Status:           Open
+Status:           Closed
 Bug Type:         Safe Mode/open_basedir
 Operating System: Linux 2.6
 PHP Version:      5CVS-2006-11-21 (snap)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2006-11-21 23:08:34] ch at hoffie dot info

Description:
------------
While move_uploaded_file() correctly worked with PHP 5.2.0, it stopped
working with recent snapshots of 5.2.1-dev (maybe earlier). Appearently
PHP (main/safe_mode.c?) checks whether the target file exists -- and
this obviously is never true for a file which is going to be moved
there (but isn't there yet).

./configure --disable-all --disable-cli --enable-fastcgi

Reproduce code:
---------------
(with safe_mode enabled and a correct file upload POST request)
<?php
  move_uploaded_file($_FILES['foo']['tmp_name'], "test.gif");
?>

Expected result:
----------------
The POSTed file should be moved to "test.gif" like in earlier PHP
versions.

Actual result:
--------------
Warning: move_uploaded_file(): Unable to access /www/test.gif in
/www/upload.php on line 2

No test.gif appears (although the permissions are correct; the uid of
PHP is the same as the directory where test.gif should be put; nothing
has been changed since the update from 5.2.0 to today's cvs snapshot)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39575&edit=1

Reply via email to