faqts : Computers : Programming : Languages : PHP : Common Problems : File Uploading

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

8 of 16 people (50%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Why is my file obviously uploaded, $userfile is shown as /tmp/php* and I can't find it???

Jan 22nd, 2002 11:35
Alexey Prohorenko, Michael Bolien, http://www.php.net/manual/en/features.file-upload.php


Well,

I had the same problem few minutes ago. Now it's solved.
First of all, I was using "Example 19-2. Validating file uploads" 
from "http://www.php.net/manual/en/features.file-upload.php" to
move just uploaded file to (in my case) to /tmp/UploadedFile.
When I add this part of code to mine, I've got error from PHP that
is_uploaded_file() is unknown, but I was using PHP 4.0.2 (!) and this
was pretty "interesting" for me. Nevertheless, I've download last 
PHP from "http://www.php.net/downloads.php", install it on my PC, and
run my script again. No error, however, I still was unable to see my
uploaded file in /tmp/php?????. But (!) I've found it in
/tmp/UploadedFile. So, everything was okay. It seems to me that Apache
or PHP kill uploaded file in temporary directory once script ends.

I hope, I was able to help you.