How to installPostgreSQL client library for PHP on Windows with SSL enabled

前端 未结 1 1692
余生分开走
余生分开走 2021-01-22 21:09

I can\'t connect from my local PHP dev server to my PostgreSQL DB on Heroku. This is because Heroku requires me to make that c

相关标签:
1条回答
  • 2021-01-22 22:07

    I had a very similar problem. I had installed PHP 5.4.28 from the PHP Windows download site, tried to connect to a remote Postgres server in a PHP script, and got the exact same error.

    I was able to fix it by:

    1. Downloading and installing pgAdmin III.
    2. Go to C:\Program Files\pgAdmin III\1.16 (or wherever pgAdmin is installed)
    3. Copy over libpq.dll and libintl.dll into the directory where PHP is installed; this will replace the existing copy of libpq.dll that ships with PHP.

    That did the trick. It looks like the libpq.dll that ships with PHP does't have SSL support compiled in, whereas the one for pgAdmin III does.

    0 讨论(0)
提交回复
热议问题