Setup - this issue is occurring in a FreeBSD jail on a TrueNAS system. While the host is TrueNAS, the issue is happening purely within a FreeBSD environment (the Jail).
I have a Jail running FreeBSD 13.1, running Caddy as a webserver, PHP 8.0, and Nextcloud. The jail was generated from a script (linked below), which then installed all of the packages and copied the appropriate INI files for PHP to run. So far, so good - Nextcloud runs, PHP seems fine, and when I check the system settings from within Nextcloud, I can see it's honoring php.ini and using the correct settings (Memory Limit being the main one).
However, when running PHP commands from the command line, it seems like PHP is ignoring, or not using, the values it uses for the web version. Specifically, two values of note are being ignored - memory_limit, and apc.enable_cli, are set in php.ini and appear to be honored when checked from within Nextcloud, but not from the command line. This is noted when running either the CRON task for scheduled maintenance (apc.emable.cli is ignored), or running Nextcloud's updater from the command line (memory_limit is ignored).
I googled the issue, and found several threads that were 5+ years old with similar symptoms, but none of the solutions provided here apply. In this case, there are no other ini files that have memory_limit set when I grep for it.
Any idea what I may be missing, that the command line is either ignoring, missing, or being overridden for php.ini as comparted to the web version?
Thank you!
I have a Jail running FreeBSD 13.1, running Caddy as a webserver, PHP 8.0, and Nextcloud. The jail was generated from a script (linked below), which then installed all of the packages and copied the appropriate INI files for PHP to run. So far, so good - Nextcloud runs, PHP seems fine, and when I check the system settings from within Nextcloud, I can see it's honoring php.ini and using the correct settings (Memory Limit being the main one).
However, when running PHP commands from the command line, it seems like PHP is ignoring, or not using, the values it uses for the web version. Specifically, two values of note are being ignored - memory_limit, and apc.enable_cli, are set in php.ini and appear to be honored when checked from within Nextcloud, but not from the command line. This is noted when running either the CRON task for scheduled maintenance (apc.emable.cli is ignored), or running Nextcloud's updater from the command line (memory_limit is ignored).
I googled the issue, and found several threads that were 5+ years old with similar symptoms, but none of the solutions provided here apply. In this case, there are no other ini files that have memory_limit set when I grep for it.
Any idea what I may be missing, that the command line is either ignoring, missing, or being overridden for php.ini as comparted to the web version?
Thank you!