Excerpt from webserver error log:-
[Mon Jul 17 11:52:41.748204 2017] [:error] [pid 31549] [client ::1:46148] PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/sunnyside/lib/plugins/pagetemplate/action.php on line 131
[/color]
I opened the relevant file with nano using the minus c switch so I can see line numbers (use whatever editor you like - but bear in mind that Windows editors tend to insert unsupported line ends)
nano -c /var/www/sunnyside/lib/plugins/pagetemplate/action.php
[/color]
This error doesn't have an obvious fix, but the solution is to replace:-
$Parser = & new Doku_Parser();
[/color]
With:-
$Parser = new Doku_Parser();
[/color]
Most of the required changes are less obscure. Example error:-
[Mon Jul 17 14:00:59.330574 2017] [:error] [pid 11281] [client ::1:46224] PHP Warning: Declaration of action_plugin_pagetemplate::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /var/www/sunnyside/lib/plugins/pagetemplate/action.php on line 0
[/color]
(Note that in this case - the change does not occur at the line number shown in the error log - instead search for the matching code string. Make sure you back up the original file first)
Replace:-
function register(&$controller) {
$controller->register_hook('HTML_PAGE_FROMTEMPLATE', 'BEFORE', $this, '_generateTemplate');
$controller->register_hook('HTML_PAGE_FROMTEMPLATE', 'AFTER', $this, '_removeTemplate');
}
[/color]
With:-
function register(Doku_Event_Handler $controller) {
$controller->register_hook('HTML_PAGE_FROMTEMPLATE', 'BEFORE', $this, '_generateTemplate');
$controller->register_hook('HTML_PAGE_FROMTEMPLATE', 'AFTER', $this, '_removeTemplate');
}
[/color]