Solved How to install a db manager for postgresql11

# pkg install phppgadmin-php73
Code:
Installed packages to be REMOVED:
    postgresql11-server-11.1
    postgresql11-client-11.1

New packages to be INSTALLED:
    phppgadmin-php73: 5.6.0
    postgresql95-client: 9.5.15_2
    php73-pgsql: 7.3.0_1

phppgadmin-php73 and postgresql11 conflicts.
 
That's the problem with binary packages: they're compiled against specific ('default') versions. And right now the default PostgreSQL version is 9.5, not 11.1. Therefor your options are basically to either downgrade PSQL to 9.5 or manually build databases/phppgadmin to reflect on your current setup. Be warned though that mixing ports & packages can have negative results, though I think the risks are minimal with this one.

When all else fails you could always rely on databases/pgadmin3, though this provides a GUI and not necessarily a web interface.
 
I like GUI, but databases/pgadmin3 popup a warning that Postgresql 8.4 to 9.6, and then several error messages, I ignore the errors, and tried some queries, works, but I don't know when wired errors will popup, the experience is bad, I won't use it.

I tried to make install databases/phppgadmin, I don't know how to solve this error:
Unknown extension pgsql for PHP 73
 
You might try upgrading your phppgadmin configuration manually. I did this on Debian 9.6 a few months ago and it worked okay. On Debian I'm running php version 7.2.11 (via ppa: ondrej/php) and postgresql version 11 (via postgresql.org's own ppa). This all worked fine, except for for phppgadmin, which I had to upgrade manually by installing the following files from this github link:

/usr/share/phppgadmin/classes/database/Connection.php
/usr/share/phppgadmin/classes/database/Postgres.php
/usr/share/phppgadmin/classes/database/Postgres10.php
/usr/share/phppgadmin/classes/database/Postgres11.php
/usr/share/phppgadmin/classes/database/Postgres92.php
/usr/share/phppgadmin/classes/database/Postgres93.php
/usr/share/phppgadmin/classes/database/Postgres94.php
/usr/share/phppgadmin/classes/database/Postgres95.php
/usr/share/phppgadmin/classes/database/Postgres96.php

On FreeBSD, the correct path for these files should be /usr/local/www/phpPgAdmin/classes/database/ rather than /usr/share/phppgadmin/classes/database/. I haven't actually tried this on FreeBSD myself but it might be worth a try if you're determined to use Postgresql 11.

There may or may not be another problem here; I'm not sure but I'll go ahead and mention it anyway. On FreeBSD I'm still using postgresql version 9.5 because when I installed php72-pgsql it wanted to install postgresql95-client even though I had already installed postgresql11-client. I have no particular need for Postgresql 11; my interest is mainly in the upgraded versions of php, so I gave up early and just regressed back to using Postgresql 9.5. But then, today, while looking things over, I noticed that pkg search php73-pgsql yields no results, although I can still find pkg search php72-pgsql. Then I checked for pkg search phppgadmin-php73 and I can't find it either.

This might likely be because I'm using i386 instead of amd64, and they just haven't gotten around to to porting this software to i386. It's also possible that they've quit supporting i386. I really don't know. What I am pretty sure about is that if you're using php and postgresql together with apache24, you will need version compatibility between postgresql, php, and the php-pgsql package. And jronald's message: "Unknown extension pgsql for PHP 73" suggests that there may not be such a package yet even for an amd64 deployment.
 
You might try upgrading your phppgadmin configuration manually. I did this on Debian 9.6 a few months ago and it worked okay. On Debian I'm running php version 7.2.11 (via ppa: ondrej/php) and postgresql version 11 (via postgresql.org's own ppa). This all worked fine, except for for phppgadmin, which I had to upgrade manually by installing the following files from this github link:

/usr/share/phppgadmin/classes/database/Connection.php
/usr/share/phppgadmin/classes/database/Postgres.php
/usr/share/phppgadmin/classes/database/Postgres10.php
/usr/share/phppgadmin/classes/database/Postgres11.php
/usr/share/phppgadmin/classes/database/Postgres92.php
/usr/share/phppgadmin/classes/database/Postgres93.php
/usr/share/phppgadmin/classes/database/Postgres94.php
/usr/share/phppgadmin/classes/database/Postgres95.php
/usr/share/phppgadmin/classes/database/Postgres96.php

On FreeBSD, the correct path for these files should be /usr/local/www/phpPgAdmin/classes/database/ rather than /usr/share/phppgadmin/classes/database/. I haven't actually tried this on FreeBSD myself but it might be worth a try if you're determined to use Postgresql 11.

There may or may not be another problem here; I'm not sure but I'll go ahead and mention it anyway. On FreeBSD I'm still using postgresql version 9.5 because when I installed php72-pgsql it wanted to install postgresql95-client even though I had already installed postgresql11-client. I have no particular need for Postgresql 11; my interest is mainly in the upgraded versions of php, so I gave up early and just regressed back to using Postgresql 9.5. But then, today, while looking things over, I noticed that pkg search php73-pgsql yields no results, although I can still find pkg search php72-pgsql. Then I checked for pkg search phppgadmin-php73 and I can't find it either.

This might likely be because I'm using i386 instead of amd64, and they just haven't gotten around to to porting this software to i386. It's also possible that they've quit supporting i386. I really don't know. What I am pretty sure about is that if you're using php and postgresql together with apache24, you will need version compatibility between postgresql, php, and the php-pgsql package. And jronald's message: "Unknown extension pgsql for PHP 73" suggests that there may not be such a package yet even for an amd64 deployment.

Thanks you very much, solved.

summary:
1. # pkg install postgresql11-server
2. # pkg install nginx php73-pgsql, and confiure properly to start the services
3. download phppgadmin release at https://github.com/phppgadmin/phppgadmin/releases
extract it to /usr/local/www/, e.g. /usr/local/www/phpPgAdmin-5.6.0
ln -fs /usr/local/www/phpPgAdmin-5.6.0 /usr/local/www/nginx
4. configure /usr/local/www/phpPgAdmin-5.6.0/conf/config.inc.php properly

BTW, phppgadmin is much more responsive than pgadmin4.
 
Thanks. I'm copying down the way you did it right now, for future reference, and will probably be upgrading to 11 myself soon using your notes, although I'll probably be staying with Apache server.
 
Back
Top