Install PDOPostgreSQL extension of php in centos

Source: Internet
Author: User
When installing php and re-installing some extensions, you may encounter problems: first, let's talk about how to install php extensions of posgresql. 1. First, go to: pecl. php. netpackagePDO_PGSQL download PDO_PGSQL-1.0.2.tgz extension package 2, unzip the package and enter the PDO_PGSQL-1.0.2 according to the php installation location to execute usrlocalphpb6b

When you reinstall some extensions after installing php, you may encounter problems: first, let's talk about how to install php extensions of posgresql. 1. First, go: http://pecl.php.net/package/pdo_pgsqldownload the PDO_PGSQL-1.0.2.tgz extension package 2. Unzip the package and enter the PDO_PGSQL-1.0.2 according to the php installation location run/usr/local/php/bin/p

InInstallPhp and then try againInstallSomeExtensionProblems:

Let's talk about howInstallPhp of posgresqlExtension

1, first to: http://pecl.php.net/package/PDO_PGSQL download PDO_PGSQL-1.0.2.tgzExtensionPackage
2, extract and enter the PDO_PGSQL-1.0.2 according to phpInstallExecute/usr/local/php/bin/phpize in location;
3. configure./configure-with-php-config =/usr/local/php/bin/php-config.
4. make & make install CompilationInstall
5. Compile the compiledExtensionExtension = pdo_pgsql.so add to php. ini and restart php-fpm to restart nginx.

It may appear in config php

Configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

Solution:

Yum install postgresql-devel and re-compile PHP.

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.