[Resolved] how do you configure php support for postgresql

Status
Not open for further replies.
#1
Greetings,
Running on centos.
Can anyone give instructions on how to get php support for postgresql working?
I got as far as rebuilding php with --with-pgsql=shared
But I suspect that a DIR needs to be specified with that. But what dir? Does something need to be installed first?
Thanks
 

NiteWave

Administrator
#2
--with-pgsql=shared
may be enough. may need modify php.ini to add a line like
extension=pgsql.so

I checked one old "CentOS release 5.11 (Final)" box, lsphp5 support pgsql, here's the full build info from phpinfo:
Code:
Configure Command =>  './configure'  '--prefix=/usr/local/lsws/lsphp5' '--with-libdir=lib64' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-zlib' '--with-gd' '--with-litespeed' '--enable-mbstring' '--with-jpeg-dir' '--with-freetype-dir' '--with-curl' '--enable-ftp' '--with-pgsql' '--enable-soap' '--with-openssl'
related option is --with-pgsql only.
 
Last edited by a moderator:
#3
The trick was to put
extension=pgsql.so
in php.ini as you suggested.
Thanks!
Oh and for anyone else reading this I was running on Centos and had to install postgresql with
yum install postgresql-devel
 
Last edited:
Status
Not open for further replies.
Top