nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
455 stars 57 forks source link

APCu doesn't allow occ to be called directly - needs to be called from php with cli support option #244

Closed TS-CUBED closed 2 years ago

TS-CUBED commented 3 years ago

Hi, just wanted to point out a problem in the documentation:

APCu has CLI support disabled by default now, so calling occ preview .... doesn't work anymore.

It does work when called through php (with apc.enable_cli), though:

php --define apc.enable_cli=1 /var/www/nextcloud/occ preview ...

so the instructions for the manual first run should be changed to

sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/occ preview:generate-all -vvv

and the cron-job needs to be:

php --define apc.enable_cli=1 /var/www/nextcloud/occ preview:pre-generate

st3iny commented 2 years ago

Yes, that is correct. However, the Nextcloud documentation already mentions to configure this option when using APCu: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id1

I'm closing this because I assume that apc.enable_cli is enabled on a properly configured Nextcloud server.