Postgresql not supported by PHP

melomane21

New member
Joined
Aug 27, 2013
Messages
2
Hi everyone
I searched the forum and web of course, the older threads didnt help.
We have a CentOS 6 directadmin enabled VPS and want to connect to postgresql through php 5.3.
I found a few helps like this one describing the steps. everything went without any problem, but i get the error "Fatal error: Call to undefined function pg_connect()" while trying to connect in php and "Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option." when accessing phpPgAdmin.
Although i recompiled php again after i add the line -with-pgsql but i dont find any thing about postgresql in phpinfo().

whats wrong?
is it possible that the custombuild does not use ap2/configure.php5? how?

Thanks
 
You are not doing it right. You must copy the configure file to the custom folder first. That howto is very wrong.

Copy the file structure and folder structure of configure to a folder called custom then try it.

Code:
cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -rfp configure/ap2/configure.php5 custom/configure/ap2/configure.php5

Then edit the custom/configure/ap2/configure.php5 and then run ./build php n

If you use custombuild 2.0 then you might even need to use configure.php53 configure.php54 or configure.php55. Also if you use fastcgi, suphp it may even be a different folder in there.
 
Hi
Thanks, the problem was solved by a guess :D
I guessed maybe I should change something in suPHP configuration. And now I see you approved it.
Although I didn't made a new custom build folder, it seems your solution is more reasonable;

Anyway thanks!
 
Back
Top