ID: 32023
Updated by: [EMAIL PROTECTED]
Reported By: sopak at matrixway dot cz
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: linux
PHP Version: 4.3.10
New Comment:
move_uploaded_file() doesn't use any PHP ini options, so it can't move
files to "default tmp dir", as it doesn't know about it.
Check your code and always use absolute path.
Previous Comments:
------------------------------------------------------------------------
[2005-02-18 18:29:51] sopak at matrixway dot cz
Description:
------------
move_uploaded_file ignore destination
if destination contains any relative path function will put file to
default tmp(and no error message is sent, and strip relative path) ,
without(move to actual position) path or with absolute path will
function move file to right destination
I used php 4.3.10
safe_mode on
base_dir I checked twice ;]
I can tell this bug was not in 4.3.9
Reproduce code:
---------------
$downloadDir="./tmp"; //local TMP dir in my space
$file=$downloadDir."upload_".md5($HTTP_POST_FILES['file']['tmp_name']);
move_uploaded_file($HTTP_POST_FILES['file']['tmp_name'],$file);
//file is stored in /tmp/$file have to be in ./tmp/$file
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32023&edit=1