artefactual / artefactual/atom-docs

Outdated / invalid PHP settings in installation guide.

Open
#176 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
21
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the installation guide section that documents PHP-FPM worker-pool php_admin_value settings. Compare the recommended OPcache and APCu directives with the linked PHP configuration references, then update the guide so it lists only valid settings and correct configuration locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.