#34922 [Opn->Fbk]: move_uploaded_file doesn't work correctly
| From: | tony2001@php.net | Date: | Wed, 19 Oct 2005 21:51:34 +0000 |
| Subject: | #34922 [Opn->Fbk]: move_uploaded_file doesn't work correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86771@lists.php.net to get a copy of this message | ||
ID: 34922
Updated by: tony2001@php.net
Reported By: cezarsignori at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Windows XP Professional
PHP Version: 4.4.1RC1
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2005-10-19 23:50:47] cezarsignori at gmail dot com
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 this bug report at http://bugs.php.net/?id=34922&edit=1