How to recover from a fatal error "Allowed memory size exhausted"

Posted by Matthieu on Stack Overflow See other posts from Stack Overflow or by Matthieu
Published on 2010-02-23T14:32:32Z Indexed on 2010/04/22 17:33 UTC
Read the original article Hit count: 228

Filed under:
|
|

Hi everybody,

Do you know any solution to recover from the PHP fatal error : "Allowed memory size ... exhausted"

I have a shutdown function that is called when a fatal error appear. This function create an ErrorException from it, and logs it.

The problem is : when there is no more memory available, it can't log the error (I log in Firebug, via FirePHP, with Zend Framework).

So what i mean by "how to recover from it", is how to perform basic error log, and let Zend Framework send the Headers, so that the error is logged (in Firebug in my case) as any other error ?

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about fatal-error