Author: etienne.massip
Description:
Firstly, I'm using PHP 5.2.6 for Windows (with php_pgsql.dll 5.2.5 because 5.2.6 is broken), installed from prepared setup.
Secondly, there is the getServerVersion() method from class PostgresField in MediaWiki's API (in file includes\db\DatabasePostgres.php) :
/**
- @return string Version information from the database */
function getServerVersion() {
$versionInfo = pg_version( $this->mConn ); $this->numeric_version = $versionInfo['server']; return $this->numeric_version;
}
Thirdly, PHP manual page of pg_version(), available at http://php.net/function.pg_version, states that :
"Protocol and server versions are only available if PHP was compiled with PostgreSQL 7.4 or later. "
As a result, I get this line in Apache's error log :
PHP Notice: Undefined index: server in MediaWiki phase3\\includes\\db\\DatabasePostgres.php on line 1058
and a blank field in Special:Version Postgresql version. This also prevented me from running initial configuration setup where a minimal version comparison is done; so I fixed by replacing the "$this->numeric_version = $versionInfo['server'];" part with "$this->numeric_version = pg_parameter_status( $this->mConn, 'server_version' );" which works whatever dbms version the library was compiled with.
Version: unspecified
Severity: normal
OS: Windows XP
Platform: PC
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=45225