Page 1 of 1
Parse error
Posted: Wed Apr 27, 2016 2:05 pm
by erosmembers
Do you know this error message:
Parse error: syntax error, unexpected end of file in /var/www/html/scj/tube/index.php(0) : eval()'d code on line 658
I did an import of my running templates into my test-system.
This templates are containing some PHP code. And now I get the error above.
It seems that the old templates without PHP code are working.
Do you have any hint, why this happens?
Re: Parse error
Posted: Wed Apr 27, 2016 3:28 pm
by admin
it's really easy - you have en error in your php code.
Re: Parse error
Posted: Wed Apr 27, 2016 6:23 pm
by erosmembers
Is it possible that something will go wrong in case of template SQL export and then import?
The templates are working on a running installation.
The second installation has a problem after import.
Re: Parse error
Posted: Wed Apr 27, 2016 6:53 pm
by admin
I don't think so.
Anyway there's no point to guess, reupload templates many times and so.
Just check your code and that's it.
Re: Parse error
Posted: Wed Apr 27, 2016 6:58 pm
by erosmembers
I checked my code.
Following code is working on my running site:
<?php if (!isset($_SESSION['user'])) {?>
<li><a data-fkt="2" href='/action/register'>Register FREE account!</a></li>
<? } ?>
This will produce the error on my test system.
So I have to change this code on my test system to:
<? if (!isset($_SESSION['user'])) {?>
<li><a data-fkt="2" href='/action/register'>Register FREE account!</a></li>
<? } ?>
But then this is not executed. It is printed on the page instead without parsing.
Is there any PHP.INI option necessary to parse the php in your templates?
Re: Parse error
Posted: Thu Apr 28, 2016 6:44 am
by admin
I think because of
<? } ?>
and short_tags option
Re: Parse error
Posted: Fri Apr 29, 2016 7:11 am
by erosmembers
What do I have to use instead?
This is working on my running site. Why?
Re: Parse error
Posted: Fri Apr 29, 2016 7:47 am
by admin