PGSQL not loaded in PHP 5.3 Windows under IIS

梦想的初衷 提交于 2019-12-11 11:21:18

问题


I know there are other questions about problems with PGSQL not loading, but I haven't found a solution that works for me and directly addresses an IIS setup under Windows (obviously). Using PostgreSQL 8.4.

Since I am a complete novice in PHP (only trying to get MantisBT to run) I find this extremely hard to debug/research.

I've set the path to both PostgreSQL bin folder and the PHP folders (v5.3 subfolder first and the PHP root after that). I've checked that libpq.dll is present in all three of these folders and I've tried copying the libpq.dll from the PostgreSQL folder to both PHP folders. I've made sure php.ini contains

extension=php_pdo_pgsql.dll
extension=php_pgsql.dll

in both PHP folders (root as well as v5.3).

What more to check/try/examine?


回答1:


Tried phpinfo() again, and it reports

Loaded Configuration File = C:\Program Files (x86)\PHP\v5.3\php.ini

which is correct and contains extension=php_pdo_pgsql.dll and extension=php_pgsql.dll. As for "the dll's are in the right place" (@Richard), I have problems making sure exactly what dll:s are needed and where they should be located, but I have in C:\Program Files (x86)\PHP\v5.3\ext\ both php_pdo_pgsql.dll (version 5.3.12.0) and php_pgsql.dll (version 5.3.12.0).

I read about a dependency on libpq.dll and this is present in C:\Program Files (x86)\PHP\v5.3\. Early in my "debugging" I copied the new libpq.dll (version 8.4.4.10133) from PostgreSQL to that folder, having read somewhere that it might solve the problem. I now tried reverting to the old version (8.3.6.9034) that shipped with PHP, and VOILA!!!! Suddenly phpinfo() says it has loaded both pdo and non-pdo pgsql modules.

MantisBT now loads the login screen at least. Whew!



来源:https://stackoverflow.com/questions/19138373/pgsql-not-loaded-in-php-5-3-windows-under-iis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!