Installing phpPgAdmin 5.1 on Ubuntu 16.04 with PostgreSQL 10 not supported

Ong Ming Soon picture Ong Ming Soon · Oct 17, 2017 · Viewed 9.4k times · Source

Install based on https://www.howtoforge.com/tutorial/ubuntu-postgresql-installation/ in my ubuntu 16.04

Log into http://localhost/phppgadmin/ PostgreSQL, browser show Version of PostgreSQL not supported. Please upgrade to version or later.

Any resolution?

Answer

DToch picture DToch · Nov 18, 2017

Actually you still can modify this file manually:

classes/database/Connection.php

// Detect version and choose appropriate database driver
switch (substr($version,0,3)) {
    case '9.5': return 'Postgres'; break;
    case '9.4': return 'Postgres94'; break;
    case '9.3': return 'Postgres93'; break;
    case '9.2': return 'Postgres92'; break;
    case '9.1': return 'Postgres91'; break;
    case '9.0': return 'Postgres90'; break;
    case '8.4': return 'Postgres84'; break;
    case '8.3': return 'Postgres83'; break;
    case '8.2': return 'Postgres82'; break;
    case '8.1': return 'Postgres81'; break;
    case '8.0':
    case '7.5': return 'Postgres80'; break;
    case '7.4': return 'Postgres74'; break;
}

switch (substr($version,0,4)) {
    case '10.1': return 'Postgres'; break;
}

Not fully tested, but all the main functions work fine.

Or create your own fork of https://github.com/phppgadmin/phppgadmin and create/fix a couple of files for implementing full support.