PHP not loading php_pgsql.dll on Windows

后端 未结 17 1838
面向向阳花
面向向阳花 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

    Check out the info on the PHP PostgreSQL installation page: http://us.php.net/manual/en/pgsql.installation.php

    On a Windows server, configured with Apache, adding the following line to httpd.conf to load libpq.dll can save you a lot of time :

    LoadFile "C:/Program Files/PostgreSQL/8.4/bin/libpq.dll"
    

    Note that you will have to change your folder accordingly to the installation path and version of PostgreSQL you have installed. Also note that having Apache and PostgreSQL on the same server for production environments is not recommended.

    This fixed my setup instantly.

提交回复
热议问题