I intalled correctly PostgreSQL and is running ok, as I can access the DB via the admin tool.
I'm trying to configure PHP 5.2.13 to load postgres extension, but failed so far, I don't get any information in PHP error log or Apache error log. So far I've done:
- Include PostgreSQL bin on windows path
- Copy php_pgsql.dll from my php/ext folder into system32 folder (also tryied other folders in the system path)
- Include the lines extension=php_pgsql.dll in php.ini and/or LoadFile "C:/Program Files/PostgreSQL/9.0/bin/libpq.dll" in httpd.conf, both together and separa开发者_运维技巧tely, all of the combinations resulting in Apache unable to restart without any log message.
I followed these instructions and others from php.net, but failed so char.
Any ideas or help?
Thank you
php_pgsql.dll have to be in the ext folder of your PHP installation. After you put the file there and enabled in in php.ini (the way you did) you have to restart the web server. After that you have to see PostreSQL extension in your phpinfo()
Starting from PostgreSQL 9.3 and above Apache will not start with libpq.dll supplied with PostgreSQL. Instead in httpd.conf file of Apache set the path to the libpq.dll of PHP catalog. In my case it is:
LoadFile "D:/PHP5.6.3/libpq.dll"
In addition to your steps above, try setting PHP extensions from within Wampserver by left clicking on Wampserver (green) icon -> PHP -> PHP Extensions -> click next to these extensions in the list (to check):
- pdo_pgsql
- pgsql
Here's my setup:
- Windows 10,
- Wampserver 3.1.9 (x64) which contains:
- Apache 2.4.39,
- PHP 7.3.7,
- MySQL 5.7.24
- PostgreSQL 11
精彩评论