New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSCache and CWP CageFS at no extra cost with all CWPpro licences. The LSCache plugin is integrated into our WordPress and other script installers, and CWP CageFS gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Issue with phpPgAdmin - Can not open it and getting error message

Started by naeemdal, December 28, 2022, 06:22:19 AM

Previous topic - Next topic

naeemdal

Hi, I am running CWP 0.9.8.1148 on CentOS Linux release 7.9.2009 (Core) OS. I have Installed PHP Version 8.0.0 and uncommented the following in PHP.ini Configuration; I also On the toggled button (pgsql, pdo-pgsql) while installing PHP 8

extension=pdo_pgsql
extension=pgsql

I also installed PostgreSQL 13.9 from PostgreSQL Manager. I restarted the Apache and PostgreSQL, but phpPgAdmin did not appear, so I Googled and found the following script;

sh /scripts/install_phpPgAdmin

After running the above, the phpPgAdmin appeared in CWP. But When I click on it, I get the following error;

QuoteYour PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

After that, I went back to CWP Apache Re-Build and added "--with-pgsql" under Additional configuration (only for advanced users): and started the compiler in Background. Once the compiler finished, I restarted Apache and PostgreSQL as well as rebooted the whole server, but still I am getting the following error;

QuoteYour PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

I Googled a lot but could not find any resolution; I tried everything I mentioned above and found it here on the CWP forum.

I shall be thankful if someone could assist in this regard.

naeemdal

Updates:

I removed Centos7, reinstalled Distro Name: CentOS Stream release 8 Kernel Version: 4.18.0-408.el8.x86_64 and then installed the CWP version: 0.9.8.1148; after rebooting the server, I switched to PHP 8.1.6 and enabled extension=pdo_pgsql and extension=pgsql, and uncommented those two lines in php.ini as well.

After that, I rebuilt the apache with --with-pgsql and rebooted the server.

Then I installed the PostgreSQL Manager and installed 13.9. Restarted httpd but phpPgAdmin did not appear, so again I ran the following ;
sh /scripts/install_phpPgAdmin

After running the above script, phpPgAdmin appeared left side; But still no luck, and it ended with the following message;
QuoteYour PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

I think PhpPgAdmin is not supported with the CWP panel; even then, I cleaned and installed it twice and followed all the steps but no luck. I shall be grateful if someone, please assist in this regard.

juniarley

I managed to solve it by building the pgsql and pdo_pgsql modules

Edit php.ini
/usr/local/cwp/php71/php.ini

extension=pdo_pgsql
extension=pgsql


First:
I check the version:
/usr/local/cwp/php71/bin/php -v

Download php version

cd /tmp
wget http://id1.php.net/distributions/php-7.2.30.tar.gz
tar xzf php-7.2.30.tar.gz

cd php-7.2.30/ext/pdo_pgsql
phpize
./configure --with-php-config=/usr/local/cwp/php71/bin/php-config
make
make install

cd php-7.2.30/ext/pgsql
phpize
./configure --with-php-config=/usr/local/cwp/php71/bin/php-config
make
make install

sh /scripts/restart_cwpsrv