Req #76274 [Com]: FatalExceptions don't include variables and stack traces under some conditions
Edit report at https://bugs.php.net/bug.php?id=76274&edit=1
ID: 76274
Comment by: hanskrentel at yahoo dot de
Reported by: archon810 at gmail dot com
Summary: FatalExceptions don't include variables and stack
traces under some conditions
Status: Open
Type: Feature/Change Request
Package: *General Issues
Operating System: Linux
PHP Version: 7.2.5
Block user comment: N
Private report: N
New Comment:
you can do in PHP userland, at the beginning of your app (and before the error handler is
triggered), reserve some memory (e.g. by assigning a larger string to a global variable), then when
the error is triggered and w/ the problems you talk about, free that buffer.
Previous Comments:
------------------------------------------------------------------------
[2018-04-26 22:57:17] archon810 at gmail dot com
Description:
------------
Hi,
This is a follow-up directly with the PHP team regarding https://github.com/getsentry/sentry-php/issues/582,
a Sentry issue about capturing variables and stack traces for PHP.
The problem is, after certain fatal exceptions, like out of memory or maximum execution time
exceeded, Sentry is unable to capture stack traces and variables.
The conclusion in the thread is that error_get_last
(http://php.net/manual/en/function.error-get-last.php) does not provide them to Sentry in such
cases, so I'm here to facilitate a discussion around the subject and find a possible fix
because it's extremely valuable to be able to see the variables and stack traces for such fatal
failures.
If the problem is that PHP's limitation, such as bumping into the memory max, prevents this
extra info from being passed, perhaps we can introduce a configurable buffer which can help house
this data?
Please discuss.
Thank you.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76274&edit=1
Thread (7 messages)