Last modified: 2014-10-17 11:26:53 UTC
In file DatabasePostgresq.php, function getServerVersion() the version_compare fails and reports that the version is 7.3 or earlier. This is not just incorrect but misleading during installation. The call to pg_version() is made with $this->mConn which is null. A test for $this->mConn == null would avoid the misleading error message. =================== function getServerVersion() { if ( !isset( $this->numeric_version ) ) { if ($this->mConn == null) { $this->numeric_version = 'No database connection'; } else { $versionInfo = pg_version( $this->mConn ); if ( version_compare( $versionInfo['client'], '7.4.0', 'lt' ) ) { // Old client, abort install $this->numeric_version = '7.3 or earlier'; } elseif ( isset( $versionInfo['server'] ) ) { // Normal client $this->numeric_version = $versionInfo['server']; } else { // Bug 16937: broken pgsql extension from PHP<5.3 $this->numeric_version = pg_parameter_status( $this->mConn, 'server_version' ); } } } return $this->numeric_version; } ===================
Are you getting some error message in the installer?
The error message is that the postgres version is "7.3 or earlier". However, as in my original post, that is misleading because the database connection was null. Therefore the pg_version() function failed. Based on other errors I saw, what I suspect is happening is that the install ignores the Postgres setup on the initial install page. The page where it asks for IP and port for the database. On Debian this is mostly port 5433 NOT 5432. However, the install code ignores this and tries to connect to the database on the default port. This will fail. To work around this I found all occurrences of 5432 and edited/changed them to 5433 and the install worked.
Two fixes IMO. 1) use the port specified on the install page 2) check for null on the database connection
One thing here is that you might run into bug 28162 which mean port number is not accepted unless the page is reload (for example, by using "Back" and "Continue" button). I have changed my PostgreSQL server port number to 5433, used back and continue buttons to really save it and then it installed the MediaWiki normally without issues. Even when PostgreSQL server was not running or some permission were wrong I got appropriate error messages and not the "wrong server version error". I think the problem is somewhere else, are you using mediawiki downloaded from mediawiki.org? If not, can you try that one? I was using version tagged in git (5186d6f5b7da98e43ddf2a194f58cf9c391800a6) in my testing.
dale: If this is still a problem, could you answer comment 4, please?
Unfortunately closing this report as no further information has been provided. dale: Please feel free to reopen this report if you can provide the information asked for in comment 4 and if this still happens. Thanks!