> On Fri, Dec 22, 2017 at 9:47 PM, Jeffrey Walton <[email protected]> wrote:
> > On Fri, Dec 22, 2017 at 9:28 PM, Brian Wolff <[email protected]> wrote:
> >> https://m.mediawiki.org/wiki/Manual:How_to_debug has some info about how to
> >> enable mediawiki debug logs.
> >>
> >> For syntax highlight, the most common problem is an issue executing 
> >> external
> >> commands. The mediawiki debug log, once enabled will tell you the exact
> >> command mediawiki is trying to execute.
> >
> > Thanks Brian.
> >
> > Is there something wrong with the shown configuration? Its not the
> > full configuration; rather its the parts that are supposed to be
> > catching errors. All the error related stuff is at the very end of
> > each conf file.
> >
> > Jeff
> >
> > # tail /etc/opt/rh/rh-php71/php.ini
> >
> > # Added by JW 12/21/2017 for MediaWiki migration
> > log_errors = On
> > display_errors = On
> > display_startup_errors = On
> > error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
> > error_log = /var/log/httpd24/error_log
> >
> > # tail /var/www/html/wiki/LocalSettings.php
> >
> > # Added by JW 12/21/2017 for MediaWiki migration
> > $wgShowError = true;
> > $wgShowErrors = true;
> > $wgShowSQLError = true;
> > $wgShowSQLErrors = true;
> > $wgShowException = true;
> > $wgShowExceptions = true;
> > $wgShowExceptionDetails = true;
> 
> I'm beginning to think this is broken. I still can't get one message
> logged to the error log.
> 
> Has there been chronic problems with error logging? Have people been
> having trouble for years? What do people normally do? Just give up?
> 

When I needed to debug some MediaWiki extensions I followed the
directions at

https://www.mediawiki.org/wiki/Manual:How_to_debug

I distilled that information into these personal notes I kept:

For debugging MediaWiki edit LocalSettings.php and add

error_reporting( -1 );
ini_set( 'display_errors', 1 );

$wgShowExceptionDetails = true;
$wgDebugToolbar = true;
$wgShowDebug = true;
$wgDevelopmentWarnings = true;

$wgDebugLogFile = "/srv/mediawiki-1.28.2/logs/mw.log";

The directory for the log file MUST exist AND be writeable by
the web user AND needs to be UNDER the MediaWiki installation.

Further debugging by editing PHP code and adding for example

        wfDebug("DEBUG: " . print_r($some_variable, true));

This then shows up in the log file (and on screen if that
debugging turned on).

HTH,

Scott K

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to