Page MenuHomePhabricator

maintenance/updaters.inc attempts incorrect mysql conection.
Closed, ResolvedPublic

Description

(This note was posted on mediawiki.org - Don't know if it's a valid bug or not,
I'm adding here so it doesn't get lost --HappyDog).

The bugsystem wont send me an email for a new account and I don't care enough to
follow through via email, so here's a bug report--take it or leave it.

In maintenance/updaters.inc in the function do_interwiki_update(). The
$wgDatabase variable is brought into scope but not passed to the dbsource()
command resulting in PHP attempting to create a new MySQL connection using the
php.ini defaults. This can be fixed by adding the $wgDatabase variable as the
second parameter to the two dbsource() calls in that function.

--169.229.139.92 19:43, 27 February 2006 (UTC)


Version: unspecified
Severity: normal

Details

Reference
bz5725

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:13 PM
bzimport set Reference to bz5725.
bzimport added a subscriber: Unknown Object (MLST).

User need to create an Adminsettings.php . It contains the database
user and password for maintenance script, a sample is given and named
Adminsettings.sample .

I added a little comment in update.php (trunk@13876).

Closing as WORKFORME

robchur wrote:

In response to the original issue; the $wgDatabase global is used within the
dbsource() function if a specific database isn't passed to it. Within the
installation and update scopes, this is fine.

In response to the effective problem, I'm going to add a basic check to the
maintenance script to ensure that a connection has been established before
bothering to attempt to update. Reopening until this is done.

robchur wrote:

Now done in SVN trunk, r13880. Will backport to 1.6.