Author Topic: Fatal error: Allowed memory size of NN bytes exhausted  (Read 56818 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Fatal error: Allowed memory size of NN bytes exhausted
« on: February 15, 2009, 11:02:35 PM »
This error indicates that there is not enough memory allowed per script.
Usually this occur when processing images (resizing, creating thumbnails)

Your only solutions are:

1) create thumbnails manually and upload them with the image (or add them later) (same applied to image resizing)
2) try use ImageMagic or NetPBM instead of GD (for information about executable paths contact your host's administrator)
3) ask your server's administrator increase memory limit (good luck on this one)
4) find another host.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

rinaldos

  • Guest
Re: Fatal error: Allowed memory size of NN bytes exhausted
« Reply #1 on: March 08, 2009, 03:52:18 PM »
This little Addon worked for me. Maybe it can help you.

I put these lines in global.php and /includes/image_utils.php direct after <?php

Code: [Select]
ini_set("memory_limit", "150M");
ini_set("max_execution_time", "10000");
ini_set("default_socket_timeout", "100");
ini_set("expect.timeout", "360");
ini_set("upload_max_filesize", "134217728");
ini_set("post_max_size", "134217728");

Please try, if this helps you......

Ingo

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Fatal error: Allowed memory size of NN bytes exhausted
« Reply #2 on: March 08, 2009, 06:47:52 PM »
Thank you for this info. I'm sure many people will benefit from this.

Though, the last two lines wont work, unless you have PHP v4.2.3. or older.
these two values can only be set in .htaccess with
Code: (.htaccess) [Select]
php_value upload_max_filesize 128M
php_value post_max_size 128M


reference:
http://php.net/manual/configuration.changes.modes.php
http://php.net/manual/configuration.changes.php
http://php.net/manual/ini.list.php
« Last Edit: March 08, 2009, 07:50:33 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

rinaldos

  • Guest
Re: Fatal error: Allowed memory size of NN bytes exhausted
« Reply #3 on: July 02, 2009, 10:30:44 AM »
yes, i have also in .htaccess the following lines .....
with this integration, i have no Problems to upload files with max 1GB


<FilesMatch "\.(php|html?)$">
php_value upload_max_filesize 1024M
php_value post_max_size 1024M
</FilesMatch>


Offline Vizear

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Fatal error: Allowed memory size of NN bytes exhausted
« Reply #4 on: June 08, 2013, 09:12:46 PM »
You my friend are a god send! lol. Mines working with that code...   :mrgreen:

This little Addon worked for me. Maybe it can help you.

I put these lines in global.php and /includes/image_utils.php direct after <?php

Code: [Select]
ini_set("memory_limit", "150M");
ini_set("max_execution_time", "10000");
ini_set("default_socket_timeout", "100");
ini_set("expect.timeout", "360");
ini_set("upload_max_filesize", "134217728");
ini_set("post_max_size", "134217728");

Please try, if this helps you......

Ingo

Offline Norbi

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Fatal error: Allowed memory size of NN bytes exhausted
« Reply #5 on: June 13, 2014, 04:22:40 PM »
Hallo zusammen,

wenn ich nach dem Upload größeren Dateien auf „neue Bilder checken“ klicke, die entsprechenden Einstellungen vornehme und auf hinzufügen gehe, bekomme ich folgende Fehlermeldung...

Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to allocate 23040 bytes) in /kunden/430546_26721/webseiten/4images/includes/image_utils.php on line 80

Die hier im Forum gefundenen Hinweise sind alle älteren Datums oder läuft das auch mit der Vers. 1.7.11?

Gruß Norbi


Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.865
    • View Profile
Re: Fatal error: Allowed memory size of NN bytes exhausted
« Reply #6 on: June 13, 2014, 08:50:38 PM »
Hallo,

Allowed Memory Size ist das Problem, das muss dein Webhoster ändern. Und wenn Du root zugriff hast musste das in der PHP.ini geändert werden.

nobby
« Last Edit: June 14, 2014, 07:31:49 PM by nobby »

 

Post your comments here