Parse error

Post all bugs here
Post Reply
erosmembers
Posts: 97
Joined: Tue Mar 15, 2016 9:41 pm

Parse error

Post by erosmembers » Wed Apr 27, 2016 2:05 pm

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?

admin
Site Admin
Posts: 27603
Joined: Wed Sep 10, 2008 11:43 am

Re: Parse error

Post by admin » Wed Apr 27, 2016 3:28 pm

it's really easy - you have en error in your php code.
Have you done script update ?

erosmembers
Posts: 97
Joined: Tue Mar 15, 2016 9:41 pm

Re: Parse error

Post by erosmembers » Wed Apr 27, 2016 6:23 pm

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.

admin
Site Admin
Posts: 27603
Joined: Wed Sep 10, 2008 11:43 am

Re: Parse error

Post by admin » Wed Apr 27, 2016 6:53 pm

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.
Have you done script update ?

erosmembers
Posts: 97
Joined: Tue Mar 15, 2016 9:41 pm

Re: Parse error

Post by erosmembers » Wed Apr 27, 2016 6:58 pm

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?

admin
Site Admin
Posts: 27603
Joined: Wed Sep 10, 2008 11:43 am

Re: Parse error

Post by admin » Thu Apr 28, 2016 6:44 am

I think because of
<? } ?>

and short_tags option
Have you done script update ?

erosmembers
Posts: 97
Joined: Tue Mar 15, 2016 9:41 pm

Re: Parse error

Post by erosmembers » Fri Apr 29, 2016 7:11 am

What do I have to use instead?

This is working on my running site. Why?

admin
Site Admin
Posts: 27603
Joined: Wed Sep 10, 2008 11:43 am

Re: Parse error

Post by admin » Fri Apr 29, 2016 7:47 am

Have you done script update ?

Post Reply