Skip to content
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

Outdated / invalid PHP settings in installation guide. #176

Open
timmooney opened this issue Mar 3, 2021 · 1 comment
Open

Outdated / invalid PHP settings in installation guide. #176

timmooney opened this issue Mar 3, 2021 · 1 comment

Comments

@timmooney
Copy link

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

@jraddaoui
Copy link
Contributor

Thanks for the report and the detective work @timmooney.

I'll link this to an existing ticket where we're dealing with PHP 7.x warnings, so we take the PHP-FPM configuration in consideration too.

https://projects.artefactual.com/issues/13462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants