Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 22200 bytes) in /home/loyalto/public_htm
#1

[eluser]Unknown[/eluser]
When a jpeg image of size around 2M is uploaded , my website is displaying this error. While I am uploading the same image on my localhost it is working well, using ini_set while I set memory up to 32M still it was showing this error. Though image is being uploaded but the problem is while creating thumbnail. It is unacceptable to show this error to visitors. Any Solution to this problem

There is no problem in uploading image, it is being when it is generating thumbnail and the uploaded file is jpeg and image size is greater than or around 1.5 MB.

I have put a check it is not allowing to upload an image of size greater than 1.5MB. I have uploaded images upto 1.41 MB and that were uploaded successfully and created thumbnail successfully.

Any solution to check image size on client?
#2

[eluser]Nur Cholikul Anwar[/eluser]
Check your php.ini file:

* upload_max_filesize = 10M
* post_max_size = 10M
and the last restart your apache
#3

[eluser]Unknown[/eluser]
Actually it is not the problem in uploading file, the problem is due to the code generating thumbnail, and yet I have observed this problem with jpeg images. my server is allowing to upload larger files as it is allowing to upload videos of much larger size than 10MB.
#4

[eluser]CroNiX[/eluser]
You can't check the filesize before its uploaded (aka on the client) unless you use Flash or something. There are free great multiple uploading apps. Here is a good one called Uploadify that uses jQuery/Flash. http://www.uploadify.com/

You can check also the filesize after its uploaded and before you process it (generate thumbnail) and reject it with a custom error message if its too large (before processing so you don't get a memory error).




Theme © iAndrew 2016 - Forum software by © MyBB