Installing phpPgAdmin 5.1 on Ubuntu 16.04 with PostgreSQL 10 not supported
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.
EDIT 3: phpPgAdmin is in active development again! If you download the latest version, it supports PostgreSQL up to v11.x
http://phppgadmin.sourceforge.net/doku.php?id=download https://github.com/phppgadmin/phppgadmin
phpPgAdmin hasn't been actively developed for years. It's still a great interface for PostgreSQL, but unfortunately they only officially support up to 9.2. I've noticed that the latest version still works up to 9.6 though, at least it has in a production environment for the past 6 months, and before that worked with whatever I had (9.4 / 9.5?) for years.
I would suggest installing 9.6 instead, and going from there.
EDIT: If you're dead keen on using v10, then you can still use pgAdmin 4 as the interface, though this is not web based.
Reference: Official phpPgAdmin Website
EDIT2: See the answer by DToch for a good workaround
To be clearer, the full path is /usr/share/phppgadmin/classes/database/Connection.php
Also you can simply add
default: return 'Postgres'; break;
at the end of the switch statement.
Also needed is the username for logging in should be "postgres". Not well documented.