#34922 [NEW]: move_uploaded_file doesn't work correctly

From: Date: Wed, 19 Oct 2005 21:50:48 +0000
Subject: #34922 [NEW]: move_uploaded_file doesn't work correctly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86770@lists.php.net to get a copy of this message
From: cezarsignori at gmail dot com Operating system: Windows XP Professional PHP version: 4.4.1RC1 PHP Bug Type: Filesystem function related Bug description: move_uploaded_file doesn't work correctly Description: ------------ The problem is below: After a lot of validations i used the function move_uploaded_file on an if instruction, and it returned false, the error returned was 0, and it means "Its all Ok! Your file have been moved!", but there was no file uploaded.. And YES i have all permissions and how i said the archieve was valid. Reproduce code: --------------- } elseif (!($fcd_medicamento > 0)){ $msg_erro = "Choose a medication to associate with the file!"; } elseif ((move_uploaded_file($farq_pdf['tmp_name'], "/web/adm/capp/pdf/ ".$farq_pdf['name']))and (move_uploaded_file($farq_pdf2['tmp_name'], "/web/adm/capp/pdf/ ".$farq_pdf2['name']))) { $sql = "UPDATE sps_medicamento SET arq_resumido='".$farq_pdf['name']."', arq_completo='".$farq_pdf2['name']."' WHERE cd_medicamento = $fcd_medicamento"; if(!$DBcon->query($sql)){ echo "<b>Problem in the SQL instruction <br>n.o ".$DBcon->erro_num."</b>---> ".$DBcon->erro_msg."<br>"; Expected result: ---------------- Well i expected to see an error thats not 0, because its mean "No error" or to upload the file. Actual result: -------------- The "no error" number error have been printed(0), and the file haven't been uploaded -- Edit bug report at http://bugs.php.net/?id=34922&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34922&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34922&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34922&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34922&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34922&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34922&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34922&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34922&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34922&r=support Expected behavior: http://bugs.php.net/fix.php?id=34922&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34922&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34922&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34922&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34922&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34922&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34922&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34922&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34922&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34922&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34922&r=mysqlcfg

« previous php.bugs (#86770) next »