Home > Article > Backend Development > What to do if an error occurs in php pg connect
Solution to php pg connect error: 1. Find and open the php.ini configuration file; 2. Delete the semicolon in front of "extension=php_pgsql.dll" in the php.ini file; 3. Just resave the php.ini file.
The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.
php pg connect What should I do if I get an error?
Error message:
Fatal error: Call to undefined function pg_connect()
Solution:
Find the php.ini file
Remove the semicolon in front of extension=php_pgsql.dll in the php.ini file
Note: If you use php installed by xmapp, you must also add php.ini-development and php.ini-production like this Modify it
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if an error occurs in php pg connect. For more information, please follow other related articles on the PHP Chinese website!