Login   Register  
PHP Classes
elePHPant
Icontem

how to change the memory limit in the class

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Thumbnail and Watermark  >  All threads  >  how to change the memory limit in the class  >  (Un) Subscribe thread alerts  
Subject:how to change the memory limit in the class
Summary:Solution to: Fatal error: Allowed memory size of 8388608 bytes e
Messages:1
Author:Emilio Rodriguez
Date:2005-09-09 07:42:40
 

  1. how to change the memory limit in the class   Reply   Report abuse  
Picture of Emilio Rodriguez
Emilio Rodriguez
2005-09-09 07:42:40
when I use it on a linux server is sometimes gives
this error:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 4796 bytes) in
httpdocs/includes/thumbnail.class.php on
line 312

Solution:

his is a memory limit error.

See the sample code in the line: (version 1.48 and +):
<?
$thumb->memory_limit='32M';
//[OPTIONAL] set maximun memory usage, (use '16M' or '32M' or ....)
?>

You can limit the memory usage, by default the memory limit in linux
php is 8MB (see php.ini), apply this line and adjust the memory limit
to your class