Solution to the problem that php_pgsql cannot be loaded: 1. Add the path of libpq.dll to the environment variable; 2. Add "LoadFile "C:/Program Files/PostgreSQL/8.4/bin/libpq to httpd.conf .dll"".
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
php cannot load php_pgsql.dll
When php and postgresql are configured, php_pgsql.dll sometimes fails to load. The error message may be as follows:
1. PHP Warning: PHP Startup: Unable to load dynamic library
2. PHP Fatal error: Call to undefined function pg_connect()
and other similar situations. In fact, the main reason is that the system cannot find libpq.dll. There are two methods to solve it.
1. Add the path of libpq.dll to the environment variable, such as: C:\Program Files\PostgreSQL\8.4\bin
2. Add
LoadFile "C:/Program Files/PostgreSQL/8.4/bin/libpq.dll"
原文请参考: http://stackoverflow.com/questions/551734/php-not-loading-php-pgsql-dll-on-windows http://us.php.net/manual/en/pgsql.installation.php
PHP Video Tutorial"
The above is the detailed content of What should I do if php_pgsql cannot be loaded?. For more information, please follow other related articles on the PHP Chinese website!