File upload exceeds upload_max_filesize
Posted: Tue May 25, 2010 8:29 pm
When trying to upload a .jpg file that is over the upload_max_filesize limit set on my server I get the following error and the filesize shows to be zero:
Warning: copy() [function.copy]: Filename cannot be empty...
My php settings are:
post_max_size 8M
upload_max_filesize 2M
My php code checks for file sizes over 1M and works if the filesize is under 2M but if they are over 2M I get the php error message mentioned above and again the filesize shows to be zero.
Does anyone know how to test for this so the error message does not appear?
Any help would be greatly appreciated.
Thanks.
Warning: copy() [function.copy]: Filename cannot be empty...
My php settings are:
post_max_size 8M
upload_max_filesize 2M
My php code checks for file sizes over 1M and works if the filesize is under 2M but if they are over 2M I get the php error message mentioned above and again the filesize shows to be zero.
Does anyone know how to test for this so the error message does not appear?
Any help would be greatly appreciated.
Thanks.