After upgrading to Zend Server for IBM i version 8.5, Zend OPcache may fail to load. In the Zend Server User Interface, the following message is displayed on the Administration -> Components tab:
Warning: The extension 'Zend OPcache' is not loaded
Also, on the PHP -> phpinfo() tab, there is no section to describe the directives for OPcache.
Zend Server for IBM i version 8.5 or later, upgraded from a previous version 8.0.2 or older of Zend Server, running on any supported version of IBM i.
Please locate this file:
Before making any changes in this file, please make sure to back it up.
The upgrade installer updates this file to have the default directives. It also attempts to retain any old directives that may have existed in the previous version. In the opcache.ini file, look at the very end to see if this section is present:
The zend_extension directive is not needed, and causes PHP to try to load the opcache.so file from the wrong directory. The first line in the new configuration is this:
That line will cause the opcache.so file to be found in the correct directory, but it is overridden by the later inclusion of zend_extension. The zend_extension line of code can be removed simply by placing a semicolon at the beginning of the line, which will make it a comment:
After making this change (remember to always back up any configuration file before changing it), save the file and restart Zend Server.
After the restart, the Administration -> Components tab in the Zend Server User Interface should show that Zend OPcache is loaded. Also, the PHP -> phpinfo() tab will include a section to describe the directives for Zend OPcache.