Add pdo_pgsql extensions under PHP

Source: Internet
Author: User

Enter the PHP source installation package (php-5. x.x) into the Ext/pdo_pgsql directory.


Install the Pgsql client first
Yum Install Postgresql-devel


Php-5.4.13 's source package is placed in:/usr/local/src/php-5.4.13
Compiling Pdo_pgsql extensions
# Cd/usr/local/src//php-5.4.13/ext/pdo_pgsql
#/usr/local/php-5.4.13/bin/phpize
#./configure–with-php-config=/usr/local/php-5.4.13/bin/php-config
# make
# Make Install





set PHP.ini
# Vim/usr/local/php/etc/php.ini


Add extension name
extension=pdo_pgsql.so
Restart php
to complete the installation of the PHP extension


Note:
1. Perform the "#./configure–with-php-config=/usr/local/php/bin/php-config" Step if the following error message appears,
you need to execute the command "# Yum install Postgresql-devel" To install the PostgreSQL development version.
error message:
Checking for PostgreSQL support for PDO ... yes, shared
checking for Pg_config ... not found

Configure:error:Cannot find Libpq-fe.h. Specify correct PostgreSQL installation path by woiit.net


This article is from the "Dream to Reality" blog, please be sure to keep this source http://lookingdream.blog.51cto.com/5177800/1941423

Add pdo_pgsql extensions under 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.