marklundeberg / dokuwiki-plugin-latex

LaTeX plugin for dokuwiki.
http://www.dokuwiki.org/plugin:latex
9 stars 6 forks source link

This plugin will crash dokuwiki #8

Open lionliy opened 7 years ago

lionliy commented 7 years ago

I copied related error message from /var/log/apach2/error.log . I understand you may have no time to fix it since this plugin has not been updated for almost 6 years. Cheers.

[Sun Dec 04 01:40:11.384257 2016] [:error] [pid 7213] [client 192.168.0.113:56815] PHP Warning: Declaration of syntax_plugin_mathjax_protecttex::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/dokuwiki/lib/plugins/mathjax/syntax/protecttex.php on line 0 [Sun Dec 04 01:40:11.385426 2016] [:error] [pid 7213] [client 192.168.0.113:56815] PHP Fatal error: Uncaught Error: Class 'evalmath' not found in /var/www/dokuwiki/lib/plugins/const/action.php:51\nStack trace:\n#0 /var/www/dokuwiki/inc/events.php(211): action_plugin_const->_doreplace(Object(Doku_Event), NULL)\n#1 /var/www/dokuwiki/inc/events.php(70): Doku_Event_Handler->process_event(Object(Doku_Event), 'BEFORE')\n#2 /var/www/dokuwiki/inc/events.php(106): Doku_Event->advise_before(false)\n#3 /var/www/dokuwiki/inc/events.php(238): Doku_Event->trigger(NULL, false)\n#4 /var/www/dokuwiki/inc/parserutils.php(204): trigger_event('PARSER_WIKITEXT...', '[[ Math Test | ...')\n#5 /var/www/dokuwiki/inc/parserutils.php(167): p_get_instructions('[[ Math Test | ...')\n#6 /var/www/dokuwiki/inc/parserutils.php(480): p_cached_instructions('/var/www/dokuwi...', false, 'start')\n#7 /var/www/dokuwiki/inc/parserutils.php(270): p_render_metadata('start', Array)\n#8 /var/www/dokuwiki/inc/common.php(245): p_get_metadata('start')\n#9 /var/www/dokuwiki/doku.php(91): pageinfo()\n#10 {main}\n thrown in /var/www/dokuwiki/lib/plugins/const/action.php on line 51 [Sun Dec 04 01:42:17.729316 2016] [:error] [pid 7217] [client 192.168.0.113:56824] PHP Warning: Declaration of syntax_plugin_latex_common::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /var/www/dokuwiki/lib/plugins/latex/latexinc.php on line 0 [Sun Dec 04 01:42:17.729368 2016] [:error] [pid 7217] [client 192.168.0.113:56824] PHP Warning: Declaration of syntax_plugin_latex_equationstar::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/dokuwiki/lib/plugins/latex/syntax/equationstar.php on line 5 [Sun Dec 04 01:42:17.729501 2016] [:error] [pid 7217] [client 192.168.0.113:56824] PHP Warning: Declaration of syntax_plugin_latex_eqnarray::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /var/www/dokuwiki/lib/plugins/latex/syntax/eqnarray.php on line 0

staze commented 6 years ago

Seeing same issue. Not sure how to resolve... =(

lprobsth commented 5 years ago

Just Edit the files mentioned in the error log.

If you're working with PHP code of other people this will occur many many times. This happens when a function / class extends an existing one. When the existing one gets an update and the passed function(String $data1) gets changed to say function(int $data1) this compatibility problem will result in this Warning. In many cases it will just work if you change the passed variables in the function declaration as mentioned in the error.log.

So just change it to "handle($match, $state, $pos, Doku_Handler $handler)" (just an example).