My other Nextcloud server, same version 13.0.6 running on ubuntu 16.04 has php7.1 with apache2. I checked and /etc/php/7.1/apache2/php.ini has the same settings enabled and I do not see warning on this server as far as opcache.
This setting is absolutely unnecessary and bad for performance. I have no idea how they came up with it.
With this setting php will use the OPcache when running PHP scripts from the command line. However, after the script ends, the OPcache is gone.
In newer versions of PHP one can use a file_cache to solve this problem. The problem is that you don’t want to use a file_cache with php-fpm or the PHP module. Or at least not exclusively.
So, no matter what, if one sets opcache.enable_cli they should also set opcache.file_cache.
For this whole thing to make any sense at all, one would need 2 php.ini files. One for cli and the other for module/sapi. Don’t forget to set opcache.file_cache_only=1 for the cli.
If only one php.ini is used, make sure that both the cli and the web/php-fpm processes can write to the cache directory.
I’m not sure if the recommendation is right or not. . I’m just trying to pass all the checks they require. I don’t think this file is read at all from nextcloud as all the settings are there but the warning remains.
Good to know someone else has the same issue. It appears Nextcloud is not referencing that php.ini file at all because the settings are there. There is another confusion in the file under opcache section. The very first entry that states: “opcache.enable=1” On my other ubuntu 16.04 with apache (same version of nextcloud 13.0.6) with php7.1 this setting shows as “opcache.enable = On” Not sure which one should it be for this new setup. The default that comes in the file is opcache.enable=1. I tried them both but the security warnings remain the same.
Anyone has any information as to how Nextcloud 13.0.6 is interacting with php.ini in Ubuntu 18.04 with Nginx ?
Since I have this thing build in a VM and plenty of snapshots saved for different stages, will test following tonight
To make sure this is not specific to 13.0.6 version of Nextcloud, I will:
Take a snapshot of the system
Enable beta channel
Upgrade to 14.0.x
If the security warnings will be gone then I’m not going to bother with fixing it knowing that 14.0.x will be released soon under the stable version. Although this does not prove that the php.ini file in the php-fpm is being used from Nextcloud.
Looks like you are using Zendopcache.
I have different setup but zend is in use. Try to find zendopcache.ini and edit it with recommended lines. I don’t know if this works for you or not, but this is how my server is configured.
If that’s not helping, check all .ini files in php.d directory. One of them may have opcache settings. Edit them.
There is a rescan option which you can use and that should actually clear your message. I just updated my OpCache settings in my PHP Ini file, and then clicked the rescan option and the message disappeared. I am using 13.06.
Its on version 13.06.
So you know where you get that message at the top about your system having some issues? Click on it, resolve them, there is a link called rescan which flushes nextcloud.
I was on an earlier version of nextcloud a few weeks back, I completely rebuilt my next cloud instance to 13.06, and this rescan option appears. It wasn’t in any of the earlier versions I think I was on 13.5. Because I have since cleared my system issues, I can’t take a screenshot to show you.
So this is not an upgrade from previous versions, also, it is running on Ubuntu 18.04LTS.
Here is the whole screen under “Basic Settings” I do not see anywhere any “Rescan”. Also like I said I have rebooted the VM several times for other changes (which I think it would have done that rescan by now)
Go to your cpanel, go to PHP settings, select the advanced settings option, your PHP.ini file should show up and you can edit in there. Make sure to unremark the line changes, and also enable OPCache while you are at it. I just copied everything out to a text file and made the changes in there and copied it back.