[PHP]memory limit

 

Encountered problem :

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes)

 

Tempory solution for debug :

Add ini_set(‘memory_limit’, ‘-1’);  in for example index.php to turn off the default memory control of PHP.

This is not the best solution, because it means that the program can use as much memory as it wants, maybe that will cause a memory overflow. The best way is to improve the program, for example pagnation to a batch etc.