Dokuwiki - Error internal 500 on php

About

When upgrading a dokuwiki installation, you may get a 500 internal server error page.

Solution / Possible cause

This is caused mostly by a syntax error somewhere in the code of a plugin.

Solving the errors

From the command line, you can check that with the below command:

cd dokuwiki
php -d error_reporting=-1 -d display_errors=On doku.php

Example of output:

Fatal error: Declaration of action_plugin_tag::register(&$contr) must be compatible 
with dokuwiki\Extension\ActionPlugin::register(Doku_Event_Handler $controller) 
in /opt/www/lib/plugins/tag/action.php on line 22

This output shows that this is the tag plugin that causes the problem. You can disable it easily if you rename the folder.

mv lib/plugins/tag lib/plugins/tag.bad

Plugin that I have disabled:

Solving the warning

From the command line, you can check that with the below command:

cd dokuwiki
php -d error_reporting=32767 -d display_errors=On doku.php | grep -i warning

Example of output:

Warning: Use of undefined constant DOKU_LEXER_EXIT - assumed 'DOKU_LEXER_EXIT' 
(this will throw an Error in a future version of PHP) in /opt/www/lib/plugins/webcomponent/syntax/cardcolumns.php on line 155

Documentation / Reference


Powered by ComboStrap