Author Topic: Issue with phpPgAdmin - Can not open it and getting error message  (Read 1961 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
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;

Code: [Select]
sh /scripts/install_phpPgAdmin
After running the above, the phpPgAdmin appeared in CWP. But When I click on it, I get the following error;

Quote
Your 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;

Quote
Your 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.

Offline
*
Re: Issue with phpPgAdmin - Can not open it and getting error message
« Reply #1 on: January 02, 2023, 07:57:24 AM »
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 ;
Code: [Select]
sh /scripts/install_phpPgAdmin
After running the above script, phpPgAdmin appeared left side; But still no luck, and it ended with the following message;
Quote
Your 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.

Offline
*
Re: Issue with phpPgAdmin - Can not open it and getting error message
« Reply #2 on: March 13, 2024, 12:17:00 PM »
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:
Code: [Select]
/usr/local/cwp/php71/bin/php -v
Download php version

Code: [Select]
cd /tmp
Code: [Select]
wget http://id1.php.net/distributions/php-7.2.30.tar.gz
Code: [Select]
tar xzf php-7.2.30.tar.gz
Code: [Select]
cd php-7.2.30/ext/pdo_pgsql
Code: [Select]
phpize
Code: [Select]
./configure --with-php-config=/usr/local/cwp/php71/bin/php-config
Code: [Select]
make
Code: [Select]
make install
Code: [Select]
cd php-7.2.30/ext/pgsql
Code: [Select]
phpize
Code: [Select]
./configure --with-php-config=/usr/local/cwp/php71/bin/php-config
Code: [Select]
make
Code: [Select]
make install
Code: [Select]
sh /scripts/restart_cwpsrv