Media Wiki Troubleshooting: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 16: Line 16:
==PHP Errors==
==PHP Errors==


Add the following to the second line from the top (right below the <?php) of [[Media_Wiki_Concepts#LocalSettings.php|LocalSettings.php]]:
Add the following to the second line from the top (right below the <?php) of <code>[[Media_Wiki_Concepts#LocalSettings.php|LocalSettings.php]]</code>:


<syntaxhighlight lang='php'>
<syntaxhighlight lang='php'>
Line 29: Line 29:
This will configure MediaWiki to show the errors in page.
This will configure MediaWiki to show the errors in page.


Also add in [[Media_Wiki_Concepts#index.php|index.php]]:
Also add in <code>[[Media_Wiki_Concepts#index.php|index.php]]</code>:
<syntaxhighlight lang='php'>
<syntaxhighlight lang='php'>
error_reporting( -1 );
error_reporting( -1 );

Revision as of 18:55, 29 December 2023

External

Internal

Debugging

PHP Info

Add a file called info.php in /var/www/mediawiki-*, with the following content, and serve it through the web server:

<?php phpinfo() ?>

PHP Errors

Add the following to the second line from the top (right below the <?php) of LocalSettings.php:

error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgDebugToolbar = true;
$wgShowExceptionDetails = true;
$wgDevelopmentWarnings = true;
$wgShowDebug = true;

This will configure MediaWiki to show the errors in page.

Also add in index.php:

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

SQL Errors

Add in LocalSettings.php:

$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;

Log Locations