Use PHP to connect PostgreSQL, Call to undefined function pg_connect();
‘PDOException’ with message ‘could not find driver’ with message ‘could not find driver’
Testing environment:
First, the extension=php_pdo_pgsql.dll and extension=php_pgsql.dll extensions are on, but not working.
Then, add \PostgreSQL\bin to the environment variable, which still doesn’t work.
Then, putting \PostgreSQL\bin\libpq.dll into System32 has no effect.
Finally, change
‘PDOException’ with message ‘could not find driver’ with message ‘could not find driver’
Testing environment:
First, the extension=php_pdo_pgsql.dll and extension=php_pgsql.dll extensions are on, but not working.
Then, add \PostgreSQL\bin to the environment variable, which still doesn’t work.
Then, putting \PostgreSQL\bin\libpq.dll into System32 has no effect.
Finally, change
libpq.dll
from \ PHP \php5.*\
into \apache*\bin to solve the problem.