Download PDO expansion pack via address Http://pecl.php.net/package/PDO_PGSQL
Find the Pgsql library in the Ext directory that comes with PHP
Step two: switch directories to Pgsql
Step three: Find Phpizewhereis phpize
Fourth step: The following code:
#/usr/bin/phpize#./configure--with-php-config=/usr/bin/php-config Find php-config location # make && make install
If it works together, you'll find /usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/
two more pdo_pgsql.so and pgsql.so .
apache:php in the configuration file, remove the Pgsql related front ;
, | Restart Apache | phpinfo();
that's when the discovery expands.
nginx:php configuration file, add extengsions= "pgsql.so", | Restart Nginx | phpinfo();
that's when the discovery expands.
Note:
In the PHP7, download the official website pecl in the pgsql of the last 2006 years of the package is not , find PHP installed after the Ext Pgsql library, do not download
PHP7 Installing Pdo_pgsql,pgsql Extensions