This RFC proposes a unified way to configure the list of PHP extensions to load.
Today, 'extension=' and 'zend_extension=' lines in php.ini must contain the extension's file name. Unfortunately, the filename depends on the platform PHP is running on :
While seasoned PHP administrators are used to this mechanism, this is a real issue for newcomers.
Under Unix/Linux, the typical mistake is to uncomment an 'extension=php_xxx.dll' line in the php.ini file.
On Windows, the situation for newcomers is still more confusing, as the distributed 'php.ini' files wrongly state that the Windows syntax is 'extension=modulename.extension', giving the wrong example of 'extension=mysqli.dll'. Ten lines below, the '.ini' file contains the right ';extension=php_mysql.dll' syntax but these conflicting directives are very confusing.
The issue may also appear when writing documentation and platform-agnostic scripts.
To summarize, I think that a unified syntax to enable extensions on every environment would make the life easier for a lot of people, especially those coming to PHP.
The issue is quite easy to solve because the logic to compute the file name from an extension name is well-known.
This RFC proposes an extension to the mechanism used to load PHP and Zend extensions. In addition to file names, it adds support for bare extension name. Note that the current syntax, using file names, remains supported as before.
Example :
extension=bz2 zend_extension=xdebug
'extension=bz2', for example, will cause PHP to load a file named 'php_bz2.dll' on Windows, a file named 'bz2.so' on Linux, and a file named 'bz2.sl' on HP-UX.
Example php.ini files are modified because loading extensions by name becomes the recommended way of configuring additional extensions to load. File names remain supported as legacy.
Cases where the extension name is accepted :
Cases where the extension name cannot be used :
None, as file names remain supported.
7.2
None
None
None
None
This RFC does not pretend solving every difference that may exist between Windows and Unix '.ini' configuration files.
The '-z' CLI option does not support extension names.
This RFC requires a 50%+1 majority.
Vote is now closed. RFC is approved for inclusion in 7.2.
Pull request (final) : https://github.com/php/php-src/pull/1741
After the project is implemented, this section should contain
Keep this updated with features that were discussed on the mail lists.