Last modified: 2014-09-24 00:52:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 28162 - Installer does not respect initial DBport declaration
Installer does not respect initial DBport declaration
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2011-03-21 19:36 UTC by Greg Sabino Mullane
Modified: 2014-09-24 00:52 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

patch to include constructor in installer (7.33 KB, patch)
2011-11-10 15:43 UTC, Karun

Description Greg Sabino Mullane 2011-03-21 19:36:00 UTC
When installing using Postgres, a change to the database port field is not respected, and always tries the default, 5432. A reload or retry does pick up the new port.
Comment 1 Tim Starling 2011-06-10 23:15:46 UTC
Temporary fix for 1.17 in r89859. Leaving open pending fix in trunk.
Comment 2 Karun 2011-11-10 15:43:35 UTC
Created attachment 9410 [details]
patch to include constructor in installer

I have begun working on a patch to change the constructor for open(...) for the database to include the port number.
Currently the installer works correctly with the patch. However once installed, MediaWiki is unable to connect to the database.

Is someone able to point me into the right direction with this?

Comment 3 Greg Sabino Mullane 2011-12-28 17:42:13 UTC
Verified the two line change to phase3/includes/installer/PostgresInstaller.php in r89859 fixes this for me, FWIW.
Comment 4 Sumana Harihareswara 2012-05-25 02:35:41 UTC
Karun, it would be great if you would submit this into Git and Gerrit:
Comment 5 Marcin Cieślak 2012-05-25 11:22:57 UTC
Push as a draft commit to Gerrit as;a=commit;h=b9757da0b051ca3b331b3626ce0874a3f838597a

Unfortunately, LocalBalancer.php fails on this:

$ php maintenance/eval.php                         
> $z = wfGetDB(-2);
DB connection error: No database connection
#0 /usr/home/saper/public_html/pg/w/includes/db/LoadBalancer.php(749): DatabaseBase->reportConnectionError('Unknown error (...')
#1 /usr/home/saper/public_html/pg/w/includes/db/LoadBalancer.php(509): LoadBalancer->reportConnectionError(Object(DatabasePostgres))
#2 /usr/home/saper/public_html/pg/w/includes/GlobalFunctions.php(3562): LoadBalancer->getConnection(-2, Array, false)
#3 /usr/home/saper/public_html/pg/w/maintenance/eval.php(72) : eval()'d code(1): wfGetDB(-2)
#4 /usr/home/saper/public_html/pg/w/maintenance/eval.php(72): eval()
#5 {main}

so I can't even run update.php

Needs more work on the LoadBalancer.php issue.
Comment 6 Sumana Harihareswara 2012-10-12 02:12:36 UTC
Comment on attachment 9410 [details]
patch to include constructor in installer

Patch is now in Gerrit.
Comment 7 Gerrit Notification Bot 2014-02-02 20:00:49 UTC
Change 8906 abandoned by Hashar:
(bug 28162) Installer ignores initial DBport

Cleaning up very old change. Feel free to resurrect if there is any interest in finishing this.

Note You need to log in before you can comment on or make changes to this bug.