[SOLVED] Allowed memory size of 8388608 bytes exhausted...

almost

Joined: 2005-01-12
Posts: 103
Posted: Mon, 2005-02-21 23:33

When selecting the "Album" tab on album edit, I get the following msg:

Quote:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 46080 bytes) in /var/www/html/gallery/lib/smarty/Smarty_Compiler.class.php on line 1628

Similar error also occasionally occurs at other times.

Did not see this prior to February snapshots (roughly).

Any ideas?

----

Gallery URL (optional):yantisgetaway.com/gallery/main.php
Gallery version:2.0-alpha-4+ (2-15 snapshot)
Webserver (with version):Apache/2.0.48 (Fedora)
Datatabase (with version):mysql 3.23.58
PHP version (eg 4.2.1):4.3.4 cgi
phpinfo URL (optional):
Graphics Toolkit(s):GD, Imagemajick, NetPBM
Operating system:Linux
Web browser/version:MSIE 6.0

 
almost

Joined: 2005-01-12
Posts: 103
Posted: Tue, 2005-02-22 14:28

Now, after adding a 4MB avi file, I get:

Quote:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3840 bytes) in /var/www/html/gallery/modules/core/classes/helpers/GalleryEventHelper_simple.class on line 54

and can't open the album.

I have set htaccess to php_value memory_limit 16M .

Are there other places I need to fool with memory settings?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7988
Posted: Wed, 2005-02-23 06:14

The error still says that you're exceeding an 8M limit (8388608 = 8M) so my guess is that your memory_limit change isn't working properly. Try changing it in your php.ini or your httpd.conf...

 
almost

Joined: 2005-01-12
Posts: 103
Posted: Wed, 2005-02-23 20:07

Host raised php memory limit to 32MB and problem has disappeared. I still wonder, though, why my .htaccess failed.

I wonder, too, what I would do in production on G2 if a problem like this occurred with a specific uploaded picture - sort of a data-dependent problem. Is there a back door to back out a "bad apple" item that prevents an album from opening correctly?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7988
Posted: Thu, 2005-02-24 01:59

This is only a problem if you're using the GD toolkit which processes images in memory. If you're using imagemagick or netpbm, you won't run into this problem because there's no limit on the amount of memory that the imagemagick/netpbm sub-processes will use.

 
ckchinn

Joined: 2005-04-27
Posts: 2
Posted: Wed, 2005-04-27 08:53

I actually run into this error trying to import a G1 album using ImageMagick as well. I've emailed my host to raise my limit, since adding a .htaccess throws an error and I don't have direct access to php.ini or httpd.conf... silly Fuitadnet...

 
KnightWolfJK
KnightWolfJK's picture

Joined: 2003-07-31
Posts: 31
Posted: Sat, 2005-10-29 16:31

Just an FYI... I'm using netpbm and I ran into this issue as well. I'll be editing my php.ini shortly.

 
pacohope
pacohope's picture

Joined: 2004-01-21
Posts: 4
Posted: Mon, 2005-11-07 15:04

I have the same problem, and the same solution will work for me. The problem is that I'm putting movies into my gallery, in addition to pictures. I have a 50 Mb QuickTime movie that fails to download because of this issue.

PHP Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 65536 bytes) in /.../gallery/modules/core/classes/GalleryPlatform.class on line 899
PHP Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 14155561 bytes) in Unknown on line 0

I get this pair of errors every time I try to download. I have 18M as my memory_limit in my php.ini. The short solution is to up the memory_limit, but I don't want people to be able to DoS my system by downloading big movies. I don't use GD.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-11-07 15:07

g2 doesn't load the complete movie into memory when downloading a movie. that doesn't make sense.
please open a new topic for that issue and post your phpinfo link etc.