Skip to content

(occ command) Adds apc.enable_cli instructions #10670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions admin_manual/configuration_server/occ_command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldnt this only apply if apcu is actually enabled?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the better performance with APCu, most people have it enabled.

Is there a problem if the APCu module is enabled on CLI but not used because it's not enabled in Nextcloud?


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
---------------------

Expand Down