Page 1 of 1

Images too big...

Posted: Fri Aug 19, 2005 10:51 am
by Zoram
I am working on an image upload script that is working just fine. The problem that I'm having is that any images that are over 2 MB trigger an error in the $_FILE array and doesn't give it a temp name so the is_uploaded_file($_FILES['file']['tmp_name']) doesn't register.

Any Suggestions?

Posted: Fri Aug 19, 2005 11:03 am
by dbevfat
this is max_upload_size and max_post_size limits problem, see
http://www.php.net/manual/en/features.file-upload.php at Related Configurations Note:

Posted: Fri Aug 19, 2005 11:56 am
by raghavan20
max_upload_size looks like a constant defined in php.ini file.
can anyone tell the default size for that???
it appears max size of the file that could be uploaded could be controlled by the form as the documentation says but also says there are ways to get around them...what r those???jus curious :roll:

Posted: Fri Aug 19, 2005 1:02 pm
by Zoram
Many settings, although they do get set, have no influence in your script.... like upload_max_filesize will get set but uploaded files are already passed to your PHP script before the settings are changed.

Also other settings, set by ini_set(), may be to late because of this (post_max_size etc.).
beware, try settings thru php.ini or .htaccess.
This was in the ini_set function manual comments. Does that mean there is really no way to use ini_set to change it. I'm not sure if the host will allow me access to the ini file.