I tried everything, for hours…
The Basics
- Nextcloud Server version:
Nextcloud Hub 9 (30.0.4)
- Operating system and version (e.g., Ubuntu 24.04):
Ubuntu 22.04
- Web server and version (e.g, Apache 2.4.25):
Apache/2.4.52 (Ubuntu)
- PHP version (e.g, 8.3):
PHP 8.3.15
- Is this the first time you’ve seen this error? (Yes / No):
yes
- When did this problem seem to first start?
nextcloud installation
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
down know, downloaded and unzip
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
don't know
Summary of the issue you are facing:
Hello, I tried almost everything and finally get rid of the warning in the backend. But still cannot use occ commands:
# sudo -u www-data php occ status
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
Steps to replicate it (hint: details matter!):
- Install NC
- Try to enable APCu
- try occ command
Log entries
Nextcloud
nothing in log file
Configuration
Nextcloud
The output of occ config:list system
or similar is best, but, if not possible, the contents of your config.php
file from /path/to/nextcloud
is fine (make sure to remove any identifiable information!):
'installed' => true,
'maintenance_window_start' => 1,
'maintenance' => false,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
Apps
The output of occ app:list
(if possible).#
error using occ
Any solutions?
I can use occ commands when I remove line in NC config.php:
‘memcache.local’ => ‘\OC\Memcache\APCu’,
update:
I tried also:
/etc/php/8.3/fpm/php.ini:
extension = apcu.so
/etc/php/8.3/apache2/php.ini :
apc.enable_cli=1
redis.session.locking_enabled=1
redis.session.lock_retries=-1
redis.session.lock_wait_time=10000
systemctl restart apache2 && systemctl restart redis-server
Additional Info:
I had some 8.4 default on command line. I deleted it. Now:
# update-alternatives --config php
There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php8.3
also phpinfo:
|apc.enable_cli|On
|apc.enabled|On
Thank you!