Bug #78565 [Opn->Dup]: Shutdown functions are not called when exit is called from output handler
Edit report at https://bugs.php.net/bug.php?id=78565&edit=1
ID: 78565
Updated by: cmb@php.net
Reported by: video dot ice dot power at seznam dot cz
Summary: Shutdown functions are not called when exit is
called from output handler
-Status: Open
+Status: Duplicate
Type: Bug
Package: *General Issues
Operating System: Debian 9
PHP Version: 7.3.9
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Closing as duplicate of <https://github.com/php/php-src/issues/7957>.
Previous Comments:
------------------------------------------------------------------------
[2021-04-06 22:18:31] video dot ice dot power at seznam dot cz
The issue is also in PHP 7.3 and 7.4, only the result is different.
Handler of ob_start should be called without any limitation and the output should be handled once
the handler ends.
------------------------------------------------------------------------
[2021-04-06 21:38:12] cmb@php.net
Well, yes, for PHP 8.0, but you specified that this is about PHP
7.3.9.
------------------------------------------------------------------------
[2021-04-06 19:21:10] video dot ice dot power at seznam dot cz
https://3v4l.org/ZoBJs - "shutting down" text is not
printed
------------------------------------------------------------------------
[2021-04-06 17:11:26] cmb@php.net
I cannot reproduce this; I get (PHP-7.3 and -7.4 on Windows, and
PHP-7.4 on Debian):
Fatal error: ob_flush(): Cannot use output buffering in output buffering display handlers
So, apparently, the shutdown handler is executed. What am I
missing?
------------------------------------------------------------------------
[2019-12-17 18:25:57] archon810 at gmail dot com
We've been trying to figure out why Sentry doesn't fire in AMP and arrived at the same
conclusion - lack of the register_shutdown_function call when in ob_, which is used by AMP.
Please see https://github.com/getsentry/sentry-php/issues/927
and https://github.com/ampproject/amp-wp/issues/3825.
If any PHP core devs would chime in, that'd be great.
Thank you.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=78565
--
Edit this bug report at https://bugs.php.net/bug.php?id=78565&edit=1
Thread (7 messages)