Old configuration at the PDO installation page
From manual page: https://php.net/pdo.installation
- Extensions don't need to be declared with file extension anymore (both Unix and Windows). Examples:
Old:
extension=pdo_sqlite.so
Old:
extension=pdo_sqlite.dll
New:
extension=pdo_sqlite
- Extensions don't need to be declared with the
php_prefix (both Unix and Windows). Examples:
Old:
extension=php_pdo_sqlite
Example (newer way):
extension=pdo_sqlite
As mentioned by @cmb69, the newer syntax is supported after PHP 7.2.
They used to be required, and these docs are "old". Feel free to submit a PR to fix this issue.
Note that the shorthands are only supported as of PHP 7.2.0, so maybe stick with the still supported, but more verbose filenames.
@cmb69 Nice. Proposal updated.
I only now had a closer look at https://php.net/pdo.installation, and appears to me that there are worse issues than using the short form of dynamically loading extensions, or not. At least the Windows part is out-dated; you can't load php_pdo.dll because there is no such DLL, since PDO is enforced to be built statically on Windows as of https://github.com/php/php-src/commit/265d2e6c5d9ea4c9e352ce5a80487dff6612eb72 (that was for PHP 5.4.0). (Maybe that comment is only about the loading order, but nonetheless, there is no php_pdo.dll for years, even if you roll your own builds.) Then dl() is mentioned as option to load the extension, and the note below states you have to restart your Webserver. However, dl() is not supported with any Webserver SAPI. Then this doc page mentions pdo_informix and pdo_mssql, although there are no DLLs available for the former for years, and the latter is not distributed with the official Windows builds for maybe even longer (I'm not even sure if it can still be built; at least users should prefer pdo_sqlsrv). Nice – this paragraph seems to have as many words, as the whole Windows section there.
And I have not even checked the Unix section; maybe someone will do that.
Nonetheless, thank you @thiagodp for the bug report. At least that triggered a partial review of that page. :)