Last modified: 2014-09-24 00:52:23 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.
Temporary fix for 1.17 in r89859. Leaving open pending fix in trunk.
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
Verified the two line change to phase3/includes/installer/PostgresInstaller.php in r89859 fixes this for me, FWIW.
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
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 on attachment 9410 [details] patch to include constructor in installer Patch is now in Gerrit.
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