Nextcloud 21 is installed and running perfectly. Not even a single error message.
‘memcache.local’ => ‘\OC\Memcache\APCu’ is in the config/config.php
apc.enable_cl`=1 is in the php.ini
opcache.enable_cli=1 is in the php.ini
On the web, Settings-Overview shows no error
But when I try to run the OCC via the command line, I get:
Blockquote
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
Blockquote
packages memcached php-memcached php-apcu are installed.
For me, I was adding apc.enable flag to the wrong php.ini file. The one that should be used is within the cli folder (/etc/php/7.3/cli/php.ini) not the one in fpm folder (/etc/php/7.3/fpm/php.ini).
Also you mistyped apc.enable_cli as apc.enable_cl`.
It worked! Thank you very much!
On Ubuntu 20.04 apc.enable_cli=1 did not fix occ when in /etc/php/<version>/php.ini /etc/php/<version>/fpm/php.ini /etc/php/<version>/apache/php.ini /etc/php/<version>/cli/php.ini
Only your suggestion to add it in /etc/php/{{ php_version }}/mods-available/apcu.ini worked!
Hello! I saw your reply and didn’t get to check the other files, but I added it to my instance running on Debian Bullseye with PHP 7.4. Now I’m able to run occ to fix my missing indices many thanks
Thank you, this solved my problem (after many days). One note I will add; I had to change the apcu.ini file in both the version 7.4 and 8.1 folders, even though I only have php7.4 enabled. Not sure why but adding the apc.enable_cli=1 line to both apcu.ini files solved the problem