#40497 [NEW]: File-Upload does not work

From: Date: Thu, 15 Feb 2007 17:13:04 +0000
Subject: #40497 [NEW]: File-Upload does not work
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-108991@lists.php.net to get a copy of this message
From: mueller at intertrend dot de Operating system: Suse Linux PHP version: 4.4.5 PHP Bug Type: *General Issues Bug description: File-Upload does not work Description: ------------ File upload does not work. upload_tmp_dir = /tmp is set in php.ini downgrade to 4.4.4 fix the problem Reproduce code: --------------- <?php $uploaddir = '/home/xxxx/www/xxxx/test'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?> Expected result: ---------------- file should be uploaded nad moved to dest-directory Actual result: -------------- ( [userfile] => Array ( [name] => test.txt [type] => [tmp_name] => [error] => 6 [size] => 0 ) ) -- Edit bug report at http://bugs.php.net/?id=40497&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40497&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40497&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40497&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40497&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40497&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40497&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40497&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40497&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40497&r=support Expected behavior: http://bugs.php.net/fix.php?id=40497&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40497&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40497&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40497&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40497&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40497&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40497&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40497&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40497&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40497&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40497&r=mysqlcfg

« previous php.bugs (#108991) next »