PHP not loading php_pgsql.dll on Windows

后端 未结 17 1798
面向向阳花
面向向阳花 2020-12-02 08:46

PHP 5.2.8 is refusing to load php_pgsql.dll, with the following error:

Warning: PHP Startup: Unable to load dynamic library \'D:\\PHP\\ext\\

17条回答
  •  情歌与酒
    2020-12-02 09:13

    For those willing to make their PHP install only capable to access PostGres servers, without actually installing PostGres, you need to:

    • enable php_pgsql.dll (and php_pdo_pgsql.dll, if using PDO) extension in PHP.INI,
    • make sure libpq.dll, libiconv-2.dll and libintl-8.dll are in the path. These are the php_pgsql.dll dependencies.

    These 3 DLLs can be found in the PostGres install. I just copied them into apache\bin, that way I keep everything self contained. Doing that, apache can start the PHP engine just fine, with PostGres support.

提交回复
热议问题