PHP extensions on E-01: separate sets for CLI and FPM
Nine new packages and a live worker check: why php -m does not show FPM modules and how the required extension sets differ.
After separately enabling automatic startup for FPM, I moved on to PHP extensions on the learning E-01. Installing the PHP core does not establish that the application can see the modules it needs. This run installed nine new packages and checked the required selection in two ways: through CLI and through the running FPM worker. A fresh read over a new SSH connection confirmed the result after the changes were applied.
The application and its tools determine the selection. The minimal Symfony skeleton needs ctype, iconv and xml. Command-line tools additionally use intl and mbstring, while unzip extracts downloaded archives. I did not add database, cache or search servers merely to complete a service inventory. This stage addresses the narrower task of preparing PHP for the application and its installation tools.
A package, a module file and a loaded extension are three different things. A package manager can confirm installation, but that does not prove that the intended process read its configuration. It is particularly easy to run only php -m and extend the conclusion to the web application. That command starts CLI, while FPM has its own startup configuration and a separate directory for scanning additional INI files.
The standard commands below read the CLI configuration. They are examples for repeating the check, not a transcript of manually installing packages. The first shows the selected INI files; the second lists modules in that particular process. In php --ini output, both the main file and the additional configuration directory matter. The latter often explains why two ways of starting PHP produce different results.
php8.5 --ini
php8.5 -m
The private FPM configuration loads only the three required dynamic modules. The standard directives below show their content rather than a complete configuration file. I do not automatically load intl and mbstring into the worker merely because CLI tools need them. This keeps the boundary clear: the application runtime receives its minimum selection, while the build tools have separate requirements.
extension=ctype.so
extension=iconv.so
extension=xml.so
To apply the new module selection, FPM was stopped once, the separate scan entries and PHP probe file were added, syntax was checked, and FPM was started once. This was a separate step after the earlier enable operation, which did not itself start or restart the service. The worker check reached the running PHP process. The JSON below presents the observed values grouped for comparison; it is neither a shell transcript nor the source code of the internal client.
{
"CLI": {
"ctype": true,
"iconv": true,
"xml": true,
"intl": true,
"mbstring": true
},
"FPM": {
"ctype": true,
"iconv": true,
"xml": true,
"intl": false,
"mbstring": false
}
}
The result shows the intended difference: CLI sees all five checked extensions, whereas FPM sees ctype, iconv and xml without intl or mbstring. There is no conflict: these are different processes with different configurations. This separation also helps diagnosis. A successful terminal command does not by itself establish that the PHP process receiving requests from Nginx has the same capabilities.
The persistent runtime budgets stayed unchanged: PHP memory_limit is 64M and the service MemoryMax is 384 MiB. The main INI, pool configuration and unit were not rewritten. Nginx retained its earlier master PID and configuration. This completes preparation of the minimal extensions; it is not yet Symfony delivery, production cache warmup or an HTTP response from the application.
PHP configuration · PHP-FPM configuration
