Wednesday, October 23, 2013

rebuild php module in centos6 (pdo_pgsql for example)

We have installed latest PostgreSQL 9.3, but pdo_pgsql from remi supports only 8.4
this is simple instruction, how to rebuild a php extension


cd /usr/src/
mkdir php
cd php/
wget http://www.php.net/get/php-5.5.5.tar.gz/from/de1.php.net/mirror
tar -xzvf php-5.5.5.tar.gz
cd php-5.5.5/ext/pdo_pgsql

go configure it and build. Use ./configure --help to see available options

phpize
aclocal
./configure --help
./configure  --with-pdo-pgsql=/usr/pgsql-9.3
make
ls modules
ls /usr/lib64/php/modules
rm -f /usr/lib64/php/modules/pdo_pgsql.so
cp modules/pdo_pgsql.so /usr/lib64/php/modules/
service httpd restart

No comments:

Post a Comment