I recently transfered my domain from strato to netcup. I installed a fresh joomla 4 and installed my template (custom written).

The Issue is I get the error: "0 - syntax error, unexpected end of file" on my main page. I've tried the same on the old server (because its still active) and it's working fine. This tells me that it's some configuration / PHP issue but I can't figure out how to fix it.

The stacktrace reads as follows:

Uncaught Throwable of type ParseError thrown with message "syntax error, unexpected end of file". stack trace: 
#0  [ROOT]/libraries/src/Dispatcher/ModuleDispatcher.php(52): include()
#1  [ROOT]/libraries/src/Dispatcher/ModuleDispatcher.php(55): Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher\{closure}()
#2  [ROOT]/libraries/src/Helper/ModuleHelper.php(281): Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch()
#3  [ROOT]/libraries/src/Helper/ModuleHelper.php(161): Joomla\CMS\Helper\ModuleHelper::renderRawModule()
#4  [ROOT]/libraries/src/Document/Renderer/Html/ModuleRenderer.php(99): Joomla\CMS\Helper\ModuleHelper::renderModule()
#5  [ROOT]/libraries/src/Document/HtmlDocument.php(667): Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render()
#6  [ROOT]/templates/customsjd/index.php(108): Joomla\CMS\Document\HtmlDocument->countModules()
#7  [ROOT]/libraries/src/Document/HtmlDocument.php(736): require('/var/www/vhosts...')
#8  [ROOT]/libraries/src/Document/HtmlDocument.php(791): Joomla\CMS\Document\HtmlDocument->_loadTemplate()
#9  [ROOT]/libraries/src/Document/HtmlDocument.php(608): Joomla\CMS\Document\HtmlDocument->_fetchTemplate()
#10 [ROOT]/libraries/src/Application/CMSApplication.php(1004): Joomla\CMS\Document\HtmlDocument->parse()
#11 [ROOT]/libraries/src/Application/SiteApplication.php(722): Joomla\CMS\Application\CMSApplication->render()
#12 [ROOT]/libraries/src/Application/CMSApplication.php(299): Joomla\CMS\Application\SiteApplication->render()
#13 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#14 [ROOT]/index.php(32): require_once('/var/www/vhosts...')
#15 {main}

If someone has an idea please help. Thanks in advance.

1 Answer 1


The option short_open_tag = "1" has to be set like that. For some reason the server had set it to 0 by default.

  • Yes, because it is not supported by default. That particular template should be corrected with normal PHP open tags and will not cause possible headache later. Well, at least I would correct that.
    – Zollie
    Commented Apr 16, 2023 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.