delphiforphp.exe - Unable To Locate Component

Abstract: The order you load PDO is significant

Problem:
I added two lines in php.ini :

extension=php_pdo_pgsql.dll
extension=php_pdo.dll

And get these errors starting D4PHP :


---------------------------
delphiforphp.exe - Unable To Locate Component
---------------------------
This application has failed to start because php_pdo.dll was not found. Re-installing the application may fix this problem.
---------------------------
OK
---------------------------

---------------------------
PHP4Delphi
---------------------------
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files\CodeGear\Delphi for PHP\1.0\php\ext\php_pdo_pgsql.dll' - The specified module could not be found.

 in Unknown on line 0
---------------------------
OK
---------------------------


... I've verified that the DLLs are in the EXT directory and were distributed with D4PHP. Why won't they load?

Solution :
Switch the order of these lines in php.ini.template (NOT php.ini):

extension=php_pdo.dll
extension=php_pdo_pgsql.dll

First you must load _pdo extension and after that, load the pdo_pgsql.