Re: Fatal error: Allowed memory size

From: Date: Thu, 27 Nov 2003 01:22:26 +0000
Subject: Re: Fatal error: Allowed memory size
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171149@lists.php.net to get a copy of this message
On Wed, 26 Nov 2003 12:43:35 -0800, you wrote: Ok, please bear in mind that I've never run into this, so what follows if guesswork. >I am using the PHP GD functions to resize my images. >I get the following error when trying to resize multiple images. It works >for one image. >------------------------------------------------------------------------- >Fatal error: Allowed memory size of 20971520 bytes exhausted at (null):0 >(tried to allocate 6816 bytes) in file >------------------------------------------------------------------------- > >PHP Config is >'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' You say it fails on multiple images. How many? Can it process 2, 3, etc? If so, my guess would be that a memory leak in the GD lib is causing the script to bump into it's memory_limit: http://uk.php.net/manual/en/configuration.directives.php#ini.memory-limit If it can only process one image, I'd look for an error in your script. Some questions that might help you get a better answer: Which PHP version? OS? GD Lib version? How big are your original image files? What does memory_get_usage() return after the first, second pass etc?

« previous php.general (#171149) next »