https://bugzilla.wikimedia.org/show_bug.cgi?id=16937

           Summary: Windows PHP 5.2.6 precompiled binaries and Postgresql
                    numeric version
           Product: MediaWiki
           Version: 1.14-svn
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: Normal
         Component: API
        AssignedTo: roan.katt...@home.nl
        ReportedBy: etienne.mas...@laposte.net
                CC: bryan.tongm...@gmail.com, vasi...@gmail.com


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.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to