atom-docs
atom-docs copied to clipboard
Outdated / invalid PHP settings in installation guide.
I've recently been struggling to get AtoM 2.5.x or 2.6.2 installed. I'm installing on RHEL and using Apache httpd rather than nginx, so I know it's off the beaten path. I've queried other AtoM users on the Google group. This report isn't about the install issue, it's about the PHP settings I've found to be incorrect as part of debugging.
While attempting to debug the problem, one of the steps I took was to modify the atom PHP-FPM worker pool, to set:
catch_workers_output = yes
With that setting enabled and the recommended php_admin_value settings in place, I can see several settings that are triggering warnings:
[02-Mar-2021 01:48:42.966688] WARNING: pid 140783, fpm_stdio_child_said(), line 190: [pool atom] child 140784 said into stderr: "NOTICE: sapi_cgi_log_message(), line 665: PHP message: PHP Warning: Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) in Unknown on line 0"
[02-Mar-2021 01:48:42.966799] WARNING: pid 140783, fpm_stdio_child_said(), line 199: [pool atom] child 140784 said into stderr: "ERROR: fpm_php_apply_defines(), line 129: Unable to set php_admin_value 'opcache.fast_shutdown'"
The first warning is coming because of the 'opcache.enable = 1' recommended php_admin_value. If the extension is installed, then with PHP 7.2 (or any PHP 7.x version) it's already being enabled in php.d/opcache.ini. Trying to enable it again triggers this warning from the worker.
The second warning is coming because opcache.fast_shutdown is no longer a valid flag at PHP 7.2.x:
https://www.php.net/manual/en/opcache.configuration.php
The next warnings are related to APCu:
[02-Mar-2021 01:48:42.966698] WARNING: pid 140783, fpm_stdio_child_said(), line 190: [pool atom] child 140784 said into stderr: "ERROR: fpm_php_apply_defines(), line 129: Unable to set php_admin_value 'apc.stat'"
[02-Mar-2021 01:48:42.966702] WARNING: pid 140783, fpm_stdio_child_said(), line 190: [pool atom] child 140784 said into stderr: "ERROR: fpm_php_apply_defines(), line 129: Unable to set php_admin_value 'apc.num_files_hint'"
It's only complaining about two of the settings, but it turns out that none of them are valid in a php_admin_value setting in a worker pool:
https://www.php.net/manual/en/apcu.configuration.php
Note that all the values the documentation is recommending either no longer exist for APCu at PHP 7.x or they're PHP_INI_SYSTEM, which means they must be set in one of the systemwide ini files, not via php_admin_value. Also, it looks like of the recommended settings, only "shm_size" is still a valid APCu setting. The "num_files_hint" appears to have changed to "entries_hint".