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