Page MenuHomePhabricator

Have a way for the installer to set all relevant debug flags by default
Open, MediumPublicFeature

Description

Have a way for the installer to set all relevant debug flags by default

Certainly useful on like the CLI installer

So in LocalSettings.php, we get near the top:

error_reporting(E_ALL);
ini_set("display_errors", 1);

or even

error_reporting(E_ALL | E_STRICT);

And at the bottom...
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql = true;

$wgDebugLogFile = ''; Enter a path to use this


Version: unspecified
Severity: enhancement

Details

Reference
bz26626

Event Timeline

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

Are you saying the default LocalSettings should have these sorts of things enabled?

Not really, though, I'm not sure how this should be executed.

In the CLIInstaller, using maybe like --includedebug would work.

For the WebInstaller, I'm not quite so sure, it's an advanced functionality that most people won't want enabled by default...

I think this isn't a bad idea for the CLI installer. Feel free to do it if you have time before me.

Is there still any interest there? It might useful for continuous integration. A Possibility would be to have some basic templates and let us specify which to prepend / append to the LocalSettings.php

Ie something like

$ cat maintenance/settings/enableErrors.php
error_reporting(E_ALL);
ini_set("display_errors", 1);

$ cat maintenance/settings/Debugging.php
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql = true;

Then:

$ php maintenance/install.php \

--prepend settings/enableErrors.php \
--append settings/Debugging.php
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: wikibugs-l-list.