Syntax Error - unexpected token

Re: Ynt: Re: Syntax Error - unexpected token

by Jack Williams Dodd -
Number of replies: 5

No I did not reach a solution unfortunately. I'm having to put up with it in my dev site and hope that when I move to production to error goes away!

In reply to Jack Williams Dodd

Re: Ynt: Re: Syntax Error - unexpected token

by Nikola Antonić -

Hi, I have same issue.

Is there any update with this?


In reply to Nikola Antonić

Re: Ynt: Re: Syntax Error - unexpected token

by Jack Williams Dodd -

Hello,

I'm afraid I haven't got any further with this. I will be installing moodle again on a different server soon, so hopefully this issue will go away. If I work out what the problem is in the process I'll let you know.

In the meantime if anyone else has any suggestions it would be greatly appreciated.

In reply to Jack Williams Dodd

Re: Ynt: Re: Syntax Error - unexpected token

by Nikola Antonić -

I just found a solution that works for me. 

I am not a developer, I use Moodle as a teacher and I don't know if I will explain it well, but in the settings of my hosting client (I use Awardspace hosting), I found "PHP settings" and in the php.ini file I disable "display_errors".

The error is no longer displayed smile It's clear to me that I haven't fixed the core of the problem, but it works properly for now.

I had the same problem as you, with same full details of the error. I used page normally but pop-up appeared constantly. Now when I disabled this in PHP setting I get rid of the pop-up.

Average of ratings: Useful (1)
In reply to Nikola Antonić

Re: Ynt: Re: Syntax Error - unexpected token

by Jack Williams Dodd -

Thank you for your response. Where did you find your php.ini file? I can see the setting is currently 'on' in the php info page, but I don't know how to change it.

In reply to Jack Williams Dodd

Re: Ynt: Re: Syntax Error - unexpected token

by Nikola Antonić -

I found in Control panel of my hosting client:



Then I changed in php.ini file:



I came to this because I saw this message on Moodle:

"Enabling the PHP setting display_errors is not recommended on production sites because some error messages may reveal sensitive information about your server."

Maybe you can find more information in this thread, they suggest to check congif.php file, but I didn't find anything similar in my config.php, so I check the PHP settings option in Awardspace control panel and find "display_errors" option.



Average of ratings: Useful (1)