Bug #79992 [Opn]: register_shutdown_function(): Invalid shutdown callback

From: Date: Tue, 18 Aug 2020 23:30:08 +0000
Subject: Bug #79992 [Opn]: register_shutdown_function(): Invalid shutdown callback
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228660@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79992&edit=1

 ID:                 79992
 User updated by:    ASchmidt at Anamera dot net
 Reported by:        ASchmidt at Anamera dot net
 Summary:            register_shutdown_function(): Invalid shutdown
                     callback
 Status:             Open
 Type:               Bug
 Package:            opcache
 Operating System:   Windows x64 IIS
 PHP Version:        7.4.9
 Block user comment: N
 Private report:     N

 New Comment:

I have spent the afternoon attempting to narrow this down - I tested with 7.4.8 and even 7.4.6 - and
the problem persists.

I then took WordPress out of the picture, and just used the single-script OpCache GUI
(https://github.com/amnuts/opcache-gui/releases/). That script will load ONCE, display valid figures
and after it ran once, FastCGI will fail on page refresh.

I have attempted adding a Cache_ID, using the CWD option, setting up a different IIS application
pool just for that one test site. Nothing makes a difference. The ONLY two things that work are -
switch that site to run through PHP 7.3.21, or disable opcache.  Only then will the OpCache GUI
project and/or WordPress 5.5 run.

Right now the problem looks like a general/generic problem with OpCache under 7.4 on IIS FCGI, but I
realize that this is not a likely scenario to not have long since been encountered.


Previous Comments:
------------------------------------------------------------------------
[2020-08-18 20:50:40] ASchmidt at Anamera dot net

Description:
------------
register_shutdown_function for existing class method will result in warning 
"PHP Warning:  register_shutdown_function(): Invalid shutdown callback"

In two other scenarios, existing instance method is reported as non-existing:
"Error: Call to undefined method".

If I disable/bypass the two code sections that reference the existing methods, then the rest of
WordPress will load - or if I disable OPCACHE (or if I disable error reporting).

Happens without any added third party PHP extensions, using a freshly installed WordPress 5.5 on IIS
x64 (FastCGI). Does NOT occur with PHP 7.3.21.

Test script:
---------------
// SCENARIO 1:

	if ( ! is_object( $handler ) || ! is_callable( array( $handler, 'handle' ) ) ) {
		$handler = new WP_Fatal_Error_Handler();
	}

	register_shutdown_function( array( $handler, 'handle' ) );


// SCENARIO 2:

		if ( WP_DEBUG && WP_DEBUG_DISPLAY ) {
			$this->show_errors();
		}





------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=79992&edit=1


Thread (6 messages)

« previous php.bugs (#228660) next »