Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP File upload problem

Status
Not open for further replies.

tweenerz

Programmer
Mar 25, 2002
202
US
I am trying to upload a file through PHP and the result is a file with 0 bytes on the server.

Everything in the $_FILES array seems ok (no error number, size is over 4k, and tmp_name is populated). And is_uploaded_file returns true so it seems it is being uploaded from ther client's computer corectly. I am setting the MAX_FILE_SIZE in the form hidden field and it equals the upload_max_filesize directive.

The move_uploaded_file function returns true.

Like I said, everything seems to operate ok, except the file has 0 bytes once it is uploaded. (although sometimes it would return an error 3 - "The uploaded file was only partially uploaded", but that hasn't happened in a while and I don't know if it is related)
 
Is the file size you are uploading equal or less than the upload_max_filesize directive?


--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top