Detect and automatically set up `php.ini` entry for installation
Opened this issue · 0 comments
asgrim commented
Typically, the approach for adding extension=blah.so
or zend_extension=blah.so
to the PHP INI would be:
- add a new file with the line in the directory indicated by
Scan for additional .ini files in:
using the priority defined incomposer.json
(e.g.20-myext.ini
) - if the
Scan for additional .ini files in:
is empty, add the line to the file indicated byLoaded Configuration File:
entry - if that is also empty, tell the user what they need to do
However, when using setups like the deb.sury.org
PHP installer, this approach would ONLY enable the ext for a single SAPI (the CLI SAPI). This would be confusing as the extension would not be enabled for the Apache SAPI, so consumers may be confused by the fact it does not have the extension loaded!
Investigate the various common approaches to how php.ini
are used, and we may need to add special handling for each "custom" approach, and then fall back to the expected typical approach above.