PHP not loading php_pgsql.dll on Windows

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

    This happened to me also with PHP 5.4.1

    Copying the offending DLL everywhere didn't work, and I don't have PostgreSQL installed in the server, but I also planned to use PHP against different Postgres versions, so the only solution I found that worked was to put in httpd.conf a line like this:

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

    And referring to the libpq.dll that comes bundled with PHP, like this:

    LoadFile "C:/php/libpq.dll"
    

    After that it worked fine to me.

提交回复
热议问题