Click to See Complete Forum and Search --> : PHP Upload problem


nshiell
07-10-2007, 01:23 PM
Hi guys I have just coded a simpler CMS that allows users to upload jpegs, gifs and pngs to the file system on a remote server

I am using a modified version of the script at here (http://www.w3schools.com/php/php_file_upload.asp)

problem is that sometimes the file gets uploded and moved to the correct direcory and some times you end up wil an empty file i.e. pic.jpg with a file size of 0KB

I have tried in IE7 and Firefox and still have the same problem

The LAN that is used in the office is a bit unstable so this could be a factor

Any ideas?

nshiell
07-11-2007, 05:32 AM
Bump!

tca
07-11-2007, 12:03 PM
One likely problem is that the file you're trying to upload exceeds the upload_max_filesize.

If your server allows you to modify the ini file try: ini_set("upload_max_filesize","2M");
Change 2M (2 megabytes) to what ever size you need. 2M is default on many servers.

TC