Article 5PM8R problems enabling apcu in php cli

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?latest?d=yIl2AUoC8zA latest?i=ED3qf-r8910:Dx6PCBy3IQg:F7zBnMy latest?i=ED3qf-r8910:Dx6PCBy3IQg:V_sGLiP latest?d=qj6IDK7rITs latest?i=ED3qf-r8910:Dx6PCBy3IQg:gIN9vFwED3qf-r8910
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments