Page 1 of 1

file upload warnings

Posted: Sun Apr 22, 2007 4:54 am
by dapa
please can somebody explain why I am recieving the following warnings when trying to upload files to my remote server?

Warning: move_uploaded_file(/upload_test/Project1.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /homepages/45/d187381196/htdocs/upload.php on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpUMBUPw' to '/upload_test/Project1.gif' in /homepages/45/d187381196/htdocs/upload.php on line 6

Re: file upload warnings

Posted: Sun Apr 22, 2007 4:56 am
by Chris Corbyn
dapa wrote:please can somebody explain why I am recieving the following warnings when trying to upload files to my remote server?

Warning: move_uploaded_file(/upload_test/Project1.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /homepages/45/d187381196/htdocs/upload.php on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpUMBUPw' to '/upload_test/Project1.gif' in /homepages/45/d187381196/htdocs/upload.php on line 6

Code: Select all

var_dump($_FILES);
My guess, you didn't check for errors in $_FILES["foo"]["error"].

Re: file upload warnings

Posted: Sun Apr 22, 2007 5:13 am
by dapa
d11wtq wrote:
dapa wrote:please can somebody explain why I am recieving the following warnings when trying to upload files to my remote server?

Warning: move_uploaded_file(/upload_test/Project1.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /homepages/45/d187381196/htdocs/upload.php on line 6

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpUMBUPw' to '/upload_test/Project1.gif' in /homepages/45/d187381196/htdocs/upload.php on line 6

Code: Select all

var_dump($_FILES);
My guess, you didn't check for errors in $_FILES["foo"]["error"].
Thanks for the advice however this was not the solution. I have worked out that I had placed a backslash incorrectly in the move_upload_file path.