Most probably you’re using very old PHP version.
Why do I think so? Because the first warning says that __DIR__
is unrecognized. It’s one of PHPs magical constants and it should contain the directory of the file.
It was introduced in PHP 5.3.0, so if such error occurs, then you have to be using older version.
And this problem causes another one… $default_path
is set to DIR/templates/
instead of correct path to templates
folder. So the next condition (checking if file exists) is false and the $template_name
is never set…
How to fix that problem?
Upgrade your PHP version. 5.6 is the least version that is still supported (only security support).