Advertisement:

Author Topic: Parse Error: Syntax Error Unexpected  (Read 399 times)

Offline TheRaven

  • Newbie
  • *
  • Posts: 7
Parse Error: Syntax Error Unexpected
« on: May 24, 2019, 10:27:35 PM »
I just logged into my forum for the first time today and was greeted with the following: Parse error: syntax error, unexpected ''{"additional_options_collapsi' (T_ENCAPSED_AND_WHITESPACE) in /home/soundoff/public_html/cache/data_efe1218df9df5d359e384e93d340b1eb-SMF-modSettings.php on line 1
I haven't touched any files, I did install a new theme but this was last week and I haven't ran into any other issues since. What needs to be edited to fix this issue? Thanks in advance! Also I have no mods installed on my forum, just some new themes. No one else has access to my FTP account nor the admin control panel as far as I'm aware.

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,872
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Parse Error: Syntax Error Unexpected
« Reply #1 on: May 25, 2019, 12:11:45 AM »
Sounds like one of your cache files got corrupted. You should be able to safely delete that file - SMF will regenerate it.
Michael Eshom
Cincy Space - now open!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,879
    • StoryBB/StoryBB on GitHub
Re: Parse Error: Syntax Error Unexpected
« Reply #2 on: May 25, 2019, 03:39:07 AM »
I really wish that we didn’t just immediately tell people to delete the file, as opposed to getting them to upload the file here first. That way, we can investigate why it failed and fix it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,493
Re: Parse Error: Syntax Error Unexpected
« Reply #3 on: May 25, 2019, 05:22:34 AM »
also which version of SMF are you using that has this issue?

Offline TheRaven

  • Newbie
  • *
  • Posts: 7
Re: Parse Error: Syntax Error Unexpected
« Reply #4 on: May 25, 2019, 03:23:33 PM »
2.1 RC2 is the version I'm using. The cache file can be viewed here:
hxxp:drive.google.com/file/d/1NgBi6MUw5R2gDHBOP_Y-6y4Vhi6j_1Ye/view?usp=sharing [nonactive]

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,879
    • StoryBB/StoryBB on GitHub
Re: Parse Error: Syntax Error Unexpected
« Reply #5 on: May 25, 2019, 04:30:53 PM »
Thank you for sharing :)

Can you ask your host if your site's files are stored on an NFS mount? What happened is that SMF thought it had written the entire file but it only wrote part of it (specifically 8KB exactly) and I'm wondering if the reason is because it's mapped to an NFS mount where things like locking don't apply the same way - and where NFS can write a different amount of file compared to what PHP thinks was written.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.