Bug #78184 [Opn->Dup]: Fatal error caused after ini_set opcache.enabled to 0 and require_once

From: Date: Wed, 19 Jun 2019 16:07:17 +0000
Subject: Bug #78184 [Opn->Dup]: Fatal error caused after ini_set opcache.enabled to 0 and require_once
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221398@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78184&edit=1 ID: 78184 Updated by: nikic@php.net Reported by: rebsch at navigate-it-services dot de Summary: Fatal error caused after ini_set opcache.enabled to 0 and require_once -Status: Open +Status: Duplicate Type: Bug Package: opcache Operating System: Ubuntu 18.04 PHP Version: 7.2.19 Block user comment: N Private report: N New Comment: Duplicate of bug #78106. This will be fixed in the next 7.2/7.3 versions. Previous Comments: ------------------------------------------------------------------------ [2019-06-19 16:01:00] rebsch at navigate-it-services dot de Description: ------------ Setup: apache + fpm 2 Files: test.php and require.php placed in the Document Root If a file that was cached in the opcache is required after disabling the opcache for the current request, php will produce a fatal error. Using the code snippets below the bug can be triggered by calling the URI /test.php followed by calling the URI /test.php?opcache PHP 7.2.17 does not show this behaviour. Test script: --------------- // test.php ini_set('display_errors', 'on'); if (array_key_exists('opcache', $_GET)) { ini_set('opcache.enable', 0); } require_once($_SERVER['DOCUMENT_ROOT'] . '/require.php'); // require.php echo('success'); Expected result: ---------------- output should always be: success Actual result: -------------- when the bug is actually triggered the result is: Fatal error: require_once(): Failed opening required '[...]/require.php' (include_path='.:/usr/share/php') in [...]/test.php on line 8 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78184&edit=1

« previous php.bugs (#221398) next »