Page MenuHomePhabricator

$wgDBserver = ''; does not work on postgresql
Open, Needs TriagePublic


Under MySQL, $wgDBserver = ''; is assumed to be localhost, but in PostgresSQL, you get an error. I believe this is due to mysqli->real_connect() ( interpreting the empty string as localhost, but no such thing for postgres. We should probably emulate that in MediaWiki.

This is a problem because the command line installer will write an empty db server to LocalSettings.php if no --dbserver is provided. The fact that this works on MySQL and not Postgres is problematic.

Event Timeline

Also probably the installer should not be adding $wgDBserver = ''?

What does $wgDBserver = '' mean? "localhost"? "use socket"?

What does $wgDBserver = '' mean? "localhost"? "use socket"?

ln mysqli it means localhost. I think we should emulate that for postgres, or have the installer stop generating empty string for postgres.

Krinkle added a subscriber: Krinkle.

The default value in DefaulSettings.php is:

$wgDBserver = 'localhost';

So omitting the '' empty string override from the installer for Postgres, and not having to hardcode this into wikimedia/rdbms, would be preferred.