No Code Attached Yet
avatar PhilETaylor
PhilETaylor
2 Apr 2021

Steps to reproduce the issue

In Joomla4 there are new commands that can be used to

  1. Install a new extension
  2. remove an extension
  3. Remove old system files
  4. upgrade Joomla.

All of these actions call at least one opcache* function in their call stacks.

Opcache in PHP is not shared between the CLI and any PHP process served by the web server, they are separate therefore invalidating the opcache using a command line tool will not remove the PHP scripts from the opcache used when browsing the website.

This can (under certain configurations of opcache that web hosts do) lead to the site being powered by the opcache, using the old Joomla files and extension files, despite having run the commands at the CLI and "perceived" to have cleared the opcache

Expected result

When modifications are made to PHP files by the new Joomla CLI files, and the opcache is enabled for PHP running in a web server (opcache.enable = 1) then "a new way" is provided for the CLI to clear the opcache, or feedback is given for the user to click a link to launch http to a new script endpoint to clear the PHP Opcache

Actual result

The CLI runs opcache* functions, which will only clear the CLI Opcache (if enabled) and will not invalidate the opcache that the website is actually using, leading to a state of inconsistency if the PHP OPcache has been configured by web hosts with a opcache.revalidate_freq that is high or opcache.validate_timestamps=0

avatar PhilETaylor PhilETaylor - open - 2 Apr 2021
avatar joomla-cms-bot joomla-cms-bot - change - 2 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Apr 2021
avatar aastha0507
aastha0507 - comment - 2 Apr 2021

Can you assign this issue to me?

avatar sandramay0905
sandramay0905 - comment - 3 Apr 2021

@aastha0507 you can work on a issue and create a pull request. The issue don't need to be assigned to you.

avatar PhilETaylor PhilETaylor - change - 7 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-07 18:38:27
Closed_By PhilETaylor
Labels Added: No Code Attached Yet
Removed: ?
avatar PhilETaylor PhilETaylor - close - 7 Mar 2022

Add a Comment

Login with GitHub to post a comment