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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30162, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28162 - Installer does not respect initial DBport declaration
Installer does not respect initial DBport declaration
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.18.x
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: ---


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

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

Hello,
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?

Regards
Karun
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:

https://www.mediawiki.org/wiki/Git/Workflow#How_to_submit_a_patch
Comment 5 Marcin Cieślak 2012-05-25 11:22:57 UTC
Push as a draft commit to Gerrit as https://gerrit.wikimedia.org/r/#/c/8906/

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fcore.git;a=commit;h=b9757da0b051ca3b331b3626ce0874a3f838597a

Unfortunately, LocalBalancer.php fails on this:


$ php maintenance/eval.php                         
> $z = wfGetDB(-2);
DB connection error: No database connection
Backtrace:
#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

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

https://gerrit.wikimedia.org/r/8906

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


Navigation
Links