problem with enabling postgresql in php

irdeveloper

Member
Mar 12, 2013
6
0
1
cPanel Access Level
Root Administrator
Hi everyone

I've a big problem with enabling postgresql in php

I'm using CPanel on a VPS , Here's the details :
CENTOS 5.9 i686 virtuozzo – WHM 11.36.0 (build 11)

I already installed the PostgreSQL In CPanel , And i have the Configure Postgres in the SqlServices

Also in my hosts control panel , I've the PostgreS control panel and phpPGAdmin too
phpPGAdmin can connect to database , And it can handle the tables
I can create databases and create users , Assigning users at etc

But the problem in , I can't work with postgre from Php
Here's my Phpinfo :
phpinfo()
You see , There's no sign of PostgreS !

I can't install php-pgsql from yum
[email protected] [/usr/local/lib/php]# yum install php-pgsql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.psw.net
* extras: mirror.informatik.hs-fulda.de
* updates: centos.intergenia.de
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package php-pgsql available.
Nothing to do
[email protected] [/usr/local/lib/php]#

And when i get the installed details :
[email protected] [/usr/local/lib/php]# yum info php-pgsql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.psw.net
* extras: centos.intergenia.de
* updates: centos.intergenia.de
Excluding Packages in global exclude list
Finished
Error: No matching Packages to list
[email protected] [/usr/local/lib/php]#

I tryed to edit the yum.confd file , And reinstall the php-pgsql ,
After reinstalling , I restart the httpd service , But again no luck

I really need to use PostgreSQL , Please let me know if it's really possible to use it with CPanel ??

By the way , I really love to know that hos phpPGAdmin can work with postgres , While it's extension is not loaded yet !

Thank you .
 

InterServed

Well-Known Member
Jul 10, 2007
275
18
68
cPanel Access Level
DataCenter Provider
Hi everyone

I've a big problem with enabling postgresql in php

I'm using CPanel on a VPS , Here's the details :
CENTOS 5.9 i686 virtuozzo – WHM 11.36.0 (build 11)

I already installed the PostgreSQL In CPanel , And i have the Configure Postgres in the SqlServices

Also in my hosts control panel , I've the PostgreS control panel and phpPGAdmin too
phpPGAdmin can connect to database , And it can handle the tables
I can create databases and create users , Assigning users at etc

But the problem in , I can't work with postgre from Php
Here's my Phpinfo :
phpinfo()
You see , There's no sign of PostgreS !

I can't install php-pgsql from yum
[email protected] [/usr/local/lib/php]# yum install php-pgsql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.psw.net
* extras: mirror.informatik.hs-fulda.de
* updates: centos.intergenia.de
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package php-pgsql available.
Nothing to do
[email protected] [/usr/local/lib/php]#

And when i get the installed details :
[email protected] [/usr/local/lib/php]# yum info php-pgsql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.psw.net
* extras: centos.intergenia.de
* updates: centos.intergenia.de
Excluding Packages in global exclude list
Finished
Error: No matching Packages to list
[email protected] [/usr/local/lib/php]#

I tryed to edit the yum.confd file , And reinstall the php-pgsql ,
After reinstalling , I restart the httpd service , But again no luck

I really need to use PostgreSQL , Please let me know if it's really possible to use it with CPanel ??

By the way , I really love to know that hos phpPGAdmin can work with postgres , While it's extension is not loaded yet !

Thank you .
You will need to rebuild your php build from EasyApache and enable PGSQL. You should find the option at Exhaustive Options List from EasyApache setup.

The reason why phpPGAdmin works is because cPanel might already activated the module for the cpanel internal php. If your on cPanel 11.36* you can check via : /usr/local/cpanel/3rdparty/php/53/bin/php -i|grep -i pgsql
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
You cannot install PGSQL PHP support via yum. You have to run easyapache and select the resopective PHP module from the list.

1. Login to server via SSH as root; now run /scripts/easyapache --force
2. Select profile "Previously saved config **Default**" and click "Start customizing based on profile"
3. Select the Apache version and click next step.
4. Select the PHP Version and click next step.
5. Scroll down to the bottom and click "Exhaustive Options List". From the list, under PHP 5.x select PGsql .Select the other ( if any )modules you wish to add;click next step
6. Now scroll to the bottom and click "Save and Build".

Let it to finish and when the process is complete run "php -m" from command line and make sure that PGsql support is loaded.

Check EasyApache (Apache Update) for more details about easyapache
 

irdeveloper

Member
Mar 12, 2013
6
0
1
cPanel Access Level
Root Administrator
Thank you guys (Techs4gnu , InterServed)

I reinstall Apache and Php by EasyApache
And i checked most of options to install ,
And well , Now i can work with Postgres ,

Well , Actually , I have to say , Really thank you :)