: This article mainly introduces the problem that PHP cannot connect to PostgreSQL. if you are interested in the PHP Tutorial, please refer to it. Recently, I met a customer who used a PostgreSQL database and never used it before. So I am a newbie and have no say too much. I just want to record the problem here and share it with you. I hope you can refer to the problem later. I will not talk much about it here.
This error occurs when you use php to connect to pgsql. the solution is as follows:
1. in the php configuration file php. ini, remove the comma before extension = php_pdo_pgsql.dll and extension = php_pgsql.dll.
2. after the above configuration is changed, another problem may be the php version problem. The environment I use is 5.3 for both wamp and phpstudy, and the problem is solved after the upgrade to 5.6 (5.4, version 5.5 has not been tried. if you are interested, try it)
Installation:
Installation diagram (online looking for): http://www.yiibai.com/html/postgresql/2013/080116.html
The above introduces the problem that PHP cannot connect to PostgreSQL, including some content. I hope my friends who are interested in PHP tutorials can help me.