Page 1 of 1
File Upload Problem
Posted: Thu Sep 22, 2005 5:09 am
by unscathed
Hi All! I need to upload image files to our server. I used the sample code from
http://www.php.net/features.file-upload. When I tested the script, I was able to upload the .gif file in the /tmp folder and was able to move it to the directory that I specified. The problem is when I tried viewing the uploaded image, it wasn't complete! (Sometimes, only half of the image appears and sometimes, it doesn't even display anything!) Also, the file size of my original image is different from the one that I uploaded. What could be causing this? Do I need to fix some configuration files?
Any help would be appreciated. Thanks in advance! ^_^
Posted: Thu Sep 22, 2005 10:01 am
by feyd
Yar, welcome to the boards. I be feyd the (mostly) friendly pi-rate (on Thursdays) moderator... yar.
Your host may be clearing the /tmp folder on a frequent basis. Since you will likely not be allowed to change the location uploaded files are saved to, ye might want to talk to yar host... yar.
/tmp folder
Posted: Thu Sep 22, 2005 7:11 pm
by unscathed
hmmm. after uploading, i use the function move_uploaded_file and then when i check the image file, it's corrupted. any suggestions? i already did everything that the user notes suggested (check upload_max_filesize and post_max_size, even added the entry that sets the LimitRequestBody in httpd.conf and restarted apache) but it still wouldn't work. has anyone encountered this problem?
thanks feyd and again, thanks in advance. ^_^