From 263b2f0fc3d81e88a202351db827a63cba6fcb25 Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Fri, 23 Jun 2023 12:24:51 -0400 Subject: [PATCH] (occ command) Adds apc.enable_cli instructions Mentioned elsewhere in the manual (for cron and the updater), but not mentioned in the occ command section. Since this triggers an exception, let's help people solve the problem themselves. Signed-off-by: Josh Richards --- admin_manual/configuration_server/occ_command.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin_manual/configuration_server/occ_command.rst b/admin_manual/configuration_server/occ_command.rst index 43551f4b5cc..cde91c3cc53 100644 --- a/admin_manual/configuration_server/occ_command.rst +++ b/admin_manual/configuration_server/occ_command.rst @@ -12,6 +12,16 @@ setting, and more. run it as your HTTP user** to ensure that the correct permissions are maintained on your Nextcloud files and directories. +.. note:: + Since APCu is disabled by default for the command-line mode of PHP, it can cause issues with Nextcloud’s ``occ`` command. Please make sure you set the ``apc.enable_cli`` parameter to ``1`` in your PHP CLI's ``php.ini`` configuration file or append ``--define apc.enable_cli=1`` each time you invoke ``occ`` - e.g.:: + + sudo -u www-data php --define apc.enable_cli=1 occ config:list system + + If you fail to do this, you will receive output such as the following:: + + 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?) + occ command Directory ---------------------