problems enabling apcu in php cli
by Kropotkin from LinuxQuestions.org on (#5PM8R)
hi all,
I've just done a fresh install of Nextcloud on my VPS running Ubuntu 20.4. The admin panel of Nextcloud recommended using a memcache, so following the documentation I installed php-apcu and added the following line to the nextcloud config.php:
Code:'memcache.local' => '\OC\Memcache\APCu',This works fine, the warning is no longer displayed. However, it breaks the nextcloud cron job:
Code:$ sudo -u www-data php -f /var/www/html/nextcloud/cron.php
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)As far as I can tell, apcu appears to be enabled for the apache version of php but not the cli. It's definitely available:
Code:$ php --info|grep -i apcu
/etc/php/7.4/cli/conf.d/20-apcu.ini,
/etc/php/7.4/cli/conf.d/25-apcu_bc.iniSo this command should work:
Code:$ sudo phpenmod -s cli apcuBut it doesn't:
Code:$ php --info|grep APCu
APCu Support => Disabled
APCu Debugging => DisabledAny ideas what I'm missing here?
I've just done a fresh install of Nextcloud on my VPS running Ubuntu 20.4. The admin panel of Nextcloud recommended using a memcache, so following the documentation I installed php-apcu and added the following line to the nextcloud config.php:
Code:'memcache.local' => '\OC\Memcache\APCu',This works fine, the warning is no longer displayed. However, it breaks the nextcloud cron job:
Code:$ sudo -u www-data php -f /var/www/html/nextcloud/cron.php
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)As far as I can tell, apcu appears to be enabled for the apache version of php but not the cli. It's definitely available:
Code:$ php --info|grep -i apcu
/etc/php/7.4/cli/conf.d/20-apcu.ini,
/etc/php/7.4/cli/conf.d/25-apcu_bc.iniSo this command should work:
Code:$ sudo phpenmod -s cli apcuBut it doesn't:
Code:$ php --info|grep APCu
APCu Support => Disabled
APCu Debugging => DisabledAny ideas what I'm missing here?