Jump to content

Allowed memory size for file uploads


Recommended Posts

We have added products with customizable properties, the file upload. We are trying to upload larger files up to 5MB and get error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 13144 bytes) in /home/greenlab/public_html/butik/images.inc.php on line 153


We have set the "The maximum size of pictures uploadable by customers (in Bytes)" to max 5 MB.


How can we increase the memory limit?

Thank you!

Link to comment
Share on other sites

Hi,
What memory_limit is set in PHP, you can check by running PHPINFO. It is usually set to 32M or less and can cause this error, I have set mine to 128M as I need customers to upload images for personalised gifts. You can either get this changed by your web host or create a PHP.INI file within the root folder of your store containing the line
ini_set("memory_limit","128M");

This should resolve the problem as I have done this on a number of hosts as well as locally

Hope this helps

Link to comment
Share on other sites

Hi,
Thank you for your feedback. We have increased our memory limit to 128MB in PHP. However, we have also set the "Maximum size of product pictures:" in admin to 5242880 bytes (5MB). It seems that this value take no effect and we still get error for uploads. We try to upload files less then 2MB and still error.

Any idea, advise?

Thanks!

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...