|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-06-19 16:07 UTC] nikic@php.net
-Status: Open
+Status: Duplicate
[2019-06-19 16:07 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 20:00:01 2025 UTC |
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