What should I do if php_pgsql cannot be loaded?

藏色散人
Release: 2023-03-09 18:08:01
Original
1930 people have browsed it

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"".

What should I do if php_pgsql cannot be loaded?

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"
Copy after login
## to httpd.conf #Both of the above methods are acceptable, the second one is relatively simple

原文请参考:
http://stackoverflow.com/questions/551734/php-not-loading-php-pgsql-dll-on-windows
http://us.php.net/manual/en/pgsql.installation.php
Copy after login
Recommended learning: "

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!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!