-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
./opcache-gui-3.3.0/index.php only shows itself as being cached, but no other files #76
Comments
Hi @reteP-riS; sorry fore the slow reply - I just didn't see that you had posted up here. Not sure, tbh. All you should need is the index,php file to be running. So maybe getting some more info from you would help. For example, are you running with Are they all on the same domain/host? And are they all served in the same way (all apache, or nginx, or FastCGI, etc.)? Maybe a screenshot or your a copy/paste of your directives might throw some light on the matter? If it can be replicated then we might be able to figure out the answer and help resolve it. |
Hi @amnuts, thanks for your reply. No need to hurry.
The situation is the same regardless of whether I only use the index.php file or the complete package.
No, opcache-gui displays
Yes, all on the same host, but in different folders and every folder is assigned to a different subdomain. The issue is the same with PHP 7.3, 7.4 and 8.0 with Whenever I call the opcache-gui index.php file it updates the start time to the current time as if it just started the opcache for the first time. It never shows a last reset time, even if I press the reset button. And as I said in my first post it only shows itself as cached and nothing more although there are hundreds of *.php.bin files in the opcache folder. The opcache-gui must feel very lonely... ;-) Attached is a pdf file with two screenshots. Thanks a lot for trying to help! |
So after looking around a bit, I think this might be expected behaviour, @reteP-riS If you're using CGI/FastCGI, then there might not be any persistence to the opcache, which is why the start time might always be as if you've only just started it, with no reset time. This Stackoverflow comment explains it: https://stackoverflow.com/a/53203797 As for the /bin files being there, it looks like opcache just doesn't remove them right away depending on how the cache is cleared... If you were to invalidate an individual file (which in the gui uses But when you do a reset cache (which uses Once the cache has been reset, the raw Hope that helps clarify some things? I'm not very familiar at all with the extension code, so might have missed something. |
PHP-FPM would be required to have a persistent OPcache instance across all requests and websites served via the same FPM pool. On regular CGI calls, a new OPcache is created on every request. But strange is that it doesn't load the file cache. It is meant to be a persistent storage so that when (re)starting a new OPcache instance it should (re)load all files from the file cache right into the shared memory: https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.file-cache |
Amongst other applications I am running a WordPress blog on this server and I am using a plugin called WP OPcache with the same php.ini configuration and CGI/FastCGI. See https://wordpress.org/plugins/flush-opcache/ Surprisingly this plugin shows the SHM details and the cached files correctly. Although I have to admit it shows less cached files than xyz.php.bin files exist in the opcache folder. I wonder how this WP OPcache plugin successfully attaches to SHM and shows the cached files while opcache-gui can't? |
I downloaded version 3.3.0, copied all the files into a ./opcache-gui-3.3.0 subdirectory of my web application and then created a link to the ./opcache-gui-3.3.0/index.php file in the top folder of my web application.
When pointing my browser to the ./opcache-gui-3.3.0/index.php file via that link everything seemed to work as expected, but then I noticed that it only shows a single file as being cached which is the ./opcache-gui-3.3.0/index.php file itself. None of the other application files are shown as being cached although I can see all the xyz.php.bin files in the opcache folder together with ./opcache-gui-3.3.0/index.php.bin.
What am I missing here?
The text was updated successfully, but these errors were encountered: