#40497 [Opn->Fbk]: File-Upload does not work

From: Date: Thu, 15 Feb 2007 17:16:09 +0000
Subject: #40497 [Opn->Fbk]: File-Upload does not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-108992@lists.php.net to get a copy of this message
ID: 40497 Updated by: derick@php.net Reported By: mueller at intertrend dot de -Status: Open +Status: Feedback Bug Type: *General Issues Operating System: Suse Linux PHP Version: 4.4.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2007-02-15 17:13:04] mueller at intertrend dot de 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 this bug report at http://bugs.php.net/?id=40497&edit=1

« previous php.bugs (#108992) next »