PHP cannot connect to PostgreSQL

Source: Internet
Author: User
: 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.