Page MenuHomePhabricator

Defines.php seems not to be loaded for maintenance scripts
Open, LowPublic

Description

Using addwiki on WMF:

PHP Notice: Use of undefined constant DBO_DEFAULT - assumed 'DBO_DEFAULT' in /home/wikipedia/common/wmf-config/db.php on line 121


Version: 1.18.x
Severity: minor

Details

Reference
bz34125

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:15 AM
bzimport set Reference to bz34125.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.Feb 1 2012, 9:20 PM

Which maintenance script did this occur for? Because doMaintenance.php does load Defines.php (it does so right before loading DefaultSettings.php and whatnot).

(In reply to comment #1)

Which maintenance script did this occur for? Because doMaintenance.php does
load Defines.php (it does so right before loading DefaultSettings.php and
whatnot).

(In reply to comment #0)

Using addwiki on WMF:

(In reply to comment #2)

(In reply to comment #1)

Which maintenance script did this occur for? Because doMaintenance.php does
load Defines.php (it does so right before loading DefaultSettings.php and
whatnot).

(In reply to comment #0)

Using addwiki on WMF:

:P Maybe I'm missing something, but I can't find that maintenance script. Is it WMF specific? Or does it have a different name in git?

(In reply to comment #3)

(In reply to comment #2)

(In reply to comment #1)

Which maintenance script did this occur for? Because doMaintenance.php does
load Defines.php (it does so right before loading DefaultSettings.php and
whatnot).

(In reply to comment #0)

Using addwiki on WMF:

:P Maybe I'm missing something, but I can't find that maintenance script. Is
it
WMF specific? Or does it have a different name in git?

It's very WMF specific, to the extent it's in extensions/WikimediaMaintenance ;)

I have added a conditional define block to the currently used db files: if ( !defined( 'DBO_DEFAULT' ) ) { define( 'DBO_DEFAULT', 16 ); }

In WMF world LocalSettings.php includes CommonSettings.php, which then includes the relevant db file.

I guess it should probably be moved to another component. It's really not of any high priority, as the files can easily be fixed up with the conditional defines.

(In reply to comment #4)

It's very WMF specific, to the extent it's in extensions/WikimediaMaintenance

Shall we move this report to that product/component combo in Bugzilla then?