Bug #78185 [Asn]: File cache no longer works

From: Date: Thu, 20 Jun 2019 05:48:15 +0000
Subject: Bug #78185 [Asn]: File cache no longer works
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221406@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78185&edit=1 ID: 78185 Updated by: krakjoe@php.net Reported by: cmb@php.net Summary: File cache no longer works Status: Assigned Type: Bug Package: opcache Operating System: Windows PHP Version: 7.3.7RC2 Assigned To: dmitry Block user comment: N Private report: N New Comment: I think the last patch (made against 7.4) looks more correct ... Previous Comments: ------------------------------------------------------------------------ [2019-06-20 05:47:31] krakjoe@php.net The following patch has been added/updated: Patch Name: file-cache-fix.patch Revision: 1561009651 URL: https://bugs.php.net/patch-display.php?bug=78185&patch=file-cache-fix.patch&revision=1561009651 ------------------------------------------------------------------------ [2019-06-20 05:40:06] krakjoe@php.net I don't fully understand why that seems to fix it, and don't understand why reverting the original change doesn't seem to fix it. Assigning to dmitry ... ------------------------------------------------------------------------ [2019-06-20 05:14:54] krakjoe@php.net Try this (patch probably won't apply on 7.3 branch) ... diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 85e0de94dd..52eab0d775 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2315,7 +2315,7 @@ int accel_activate(INIT_FUNC_ARGS) ZCG(cwd_check) = 1; if (file_cache_only) { - ZCG(accelerator_enabled) = 0; + ZCG(accelerator_enabled) = 1; return SUCCESS; } I'm pretty sure that's the problem ... ------------------------------------------------------------------------ [2019-06-20 04:52:23] krakjoe@php.net This looks highly suspect: @@ -2342,6 +2360,7 @@ static void accel_activate(void) #ifdef HAVE_OPCACHE_FILE_CACHE if (file_cache_only) { + ZCG(accelerator_enabled) = 0; return; } #endif extracted from diff of the two tags ... ------------------------------------------------------------------------ [2019-06-19 21:22:10] cmb@php.net Description: ------------ If I enable opcache.file_cache_only, phpinfo reports that the file cache is enabled, but no cache files are created. This worked with PHP 7.3.7RC1, but no longer with 7.3.7RC2. I have not checked PHP 7.2.20RC2, but it is likely affected as well. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78185&edit=1

« previous php.bugs (#221406) next »