Right after the overwrite of previous version files by the unzip in the administration, PHP engine might still have old files in cache. We do not want to use the cache and force reload of all application files. Thus we need to disable opcache.

For example, on the server I'm testing upgrade from 13.8.0 to 14.0.0, I get in the database:

```
MariaDB [tmp_pwgmig]> select * from piwigo_upgrade order by applied desc limit 10;
+-----+---------------------+----------------------------------------------------+
| id  | applied             | description                                        |
+-----+---------------------+----------------------------------------------------+
| 165 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.000 s] Add...  |
| 166 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.009 s] Crea... |
| 167 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.001 s] add ... |
| 170 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.000 s] add ... |
| 169 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.006 s] Dele... |
| 168 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.006 s] Crea... |
| 70  | 2023-12-11 17:22:28 | upgrade included in installation                   |
| 67  | 2023-12-11 17:22:28 | upgrade included in installation                   |
| 66  | 2023-12-11 17:22:28 | upgrade included in installation                   |
| 63  | 2023-12-11 17:22:28 | upgrade included in installation                   |
+-----+---------------------+----------------------------------------------------+
10 rows in set (0.001 sec)
```

Obviously upgrade 165 couldn't be applied in Piwigo 13.8.0. It's a new upgrade script in Piwigo 14!

Piwigo think we're on 13.8.0 because the old `include/constants.inc.php` is still in `opcache`. Same problem for sub-files of Smarty.
[upgrade] mixed old and new files included through opcache
This is a GitHub Issue
repo:Piwigo
owner:Piwigo
Title : [upgrade] mixed old and new files included through opcache
Issue date:

--- start body ---
Right after the overwrite of previous version files by the unzip in the administration, PHP engine might still have old files in cache. We do not want to use the cache and force reload of all application files. Thus we need to disable opcache.

For example, on the server I'm testing upgrade from 13.8.0 to 14.0.0, I get in the database:

```
MariaDB [tmp_pwgmig]> select * from piwigo_upgrade order by applied desc limit 10;
+-----+---------------------+----------------------------------------------------+
| id  | applied             | description                                        |
+-----+---------------------+----------------------------------------------------+
| 165 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.000 s] Add...  |
| 166 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.009 s] Crea... |
| 167 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.001 s] add ... |
| 170 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.000 s] add ... |
| 169 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.006 s] Dele... |
| 168 | 2023-12-11 17:22:40 | [migration from 13.0.0 to 13.8.0, 0.006 s] Crea... |
| 70  | 2023-12-11 17:22:28 | upgrade included in installation                   |
| 67  | 2023-12-11 17:22:28 | upgrade included in installation                   |
| 66  | 2023-12-11 17:22:28 | upgrade included in installation                   |
| 63  | 2023-12-11 17:22:28 | upgrade included in installation                   |
+-----+---------------------+----------------------------------------------------+
10 rows in set (0.001 sec)
```

Obviously upgrade 165 couldn't be applied in Piwigo 13.8.0. It's a new upgrade script in Piwigo 14!

Piwigo think we're on 13.8.0 because the old `include/constants.inc.php` is still in `opcache`. Same problem for sub-files of Smarty.
--- end body ---

The issue describes a potential problem with PHP's opcache retaining old versions of files after an upgrade, which can lead to incorrect application behavior and database migration issues. This can result in the application using outdated code, causing errors during the upgrade process.