On 4/17/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:
> In my current situation, bail out, but gracefully -- perhaps just send
> a 302 to an error page and exit; maybe instead throw away the output
> buffer and then directly output some friendly error text.

I think you can do it with shutdown handler, shouldn't it work? I.e. you
  can do it this way:
1. Install shutdown handler
2. Do something that takes a lot of memory
3. Memory is exhausted, script is terminated
4. The memory allocated by "something" is cleaned up, part by the
engine, part manually
5. Shutdown handler does something like output "sorry, better luck next
time" requiring minimal amount of memory.

Ah, excellent, thanks. I'll take a look. This looks like what
http://ez.no/doc/components/view/latest/(file)/Execution/ezcExecution.html
does (Derick mentions this in the comments at
http://php100.wordpress.com/2007/04/16/graceful-recovery/)

David

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to