Twice in 2 days. I had to go into the forum/cahce folder and manually delete the files in order to bring my website back on-line.
Here's the browser's error message:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /home/classig8/public_html/forum/cache/data_da970e2da8edfdf1b5562a2b426c7b03-SMF-modSettings.php on line 1
How can I correct this?
There could be an error in the modsettings.php file. If it keeps getting cached with that error the problem would repeat itself. Can you post that file.
There would be no point in attaching the file. There is a long standing bug in the caching mechanism in 2.0 that cannot be fixed without breaking other things.
Does the bug interfere with that file. ?? I'm just saying that I have never had this problem with my site going offline and doing this manually. (Just asking, not arguing ;) )
I've never had this problem before. It just started like 2 days ago but, I'm wondering if it isn't also tied in with the other issue I posted. Maybe a result of a cyber-attack on the server?
nah... it happens - there is a bug somewhere - but the fix is easy. delete the cache file - it will be regenerated correctly and you'll be all set
Quote from: Bigguy on October 19, 2013, 07:58:40 PM
Does the bug interfere with that file. ?? I'm just saying that I have never had this problem with my site going offline and doing this manually. (Just asking, not arguing ;) )
In 2.0 there is no file called ModSettings.php, it is a file generated when $modSettings is cached. If the settings table is too big, it will not be cached properly because there is a bug in the cache system where the file is only partially emitted causing this.
I know exactly what the bug is, I know exactly how to fix it but we can't do so in 2.0 because of compatibility with hosts. 2.1 has higher requirements, and 2.1 already has it fixed but the fix can't be safely backported to 2.0 at this time.
I wasn't aware of this being a known bug. Thanks Arantor.
Thanks Arantor. That pretty much scratches what I was going to say I guess. :)
Quote from: Colin on October 19, 2013, 08:09:52 PM
I wasn't aware of this being a known bug. Thanks Arantor.
It's been known for literally years now :(
QuoteIn 2.0 there is no file called ModSettings.php, it is a file generated when $modSettings is cached. If the settings table is too big, it will not be cached properly because there is a bug in the cache system where the file is only partially emitted causing this.
Okay, this isn't something I can just "live with" doing every time it happens and have my website off-line every time it happens so, whether or not anyone knew this was an issue doesn't help with the problem so...
... what am I supposed to do about it?
QuoteI know exactly what the bug is, I know exactly how to fix it but we can't do so in 2.0 because of compatibility with hosts. 2.1 has higher requirements, and 2.1 already has it fixed but the fix can't be safely backported to 2.0 at this time.
So, what does that have to do with the problem now?
Quote from: Kindred on October 19, 2013, 08:06:47 PM
nah... it happens - there is a bug somewhere - but the fix is easy. delete the cache file - it will be regenerated correctly and you'll be all set
That's what I did, Kindred and it worked like a charm... but then, it happened again. I'm going to go bonkers if I have to do this every day.
Turn caching off.
QuoteSo, what does that have to do with the problem now?
Um, 2.1 had the same problem but because of the requirements of 2.0 (still supports PHP 4) we can't backport it (since 2.1's fix requires a higher PHP version)
I shouldn't have said anything.
What about just removing the cache for modSettings in SMF 2.0 in a patch since it doesn't work right anyway.
Well... here's the thing... it's not just modSettings that's actually a potential problem. ALL of the caching potentially could screw up. If the resultant cache file would be more than 8KB, it's going to cause it to fail.
It just so happens that modSettings is the most likely case - and cleaning up the table would also fix that problem.
Thank you. I turned-off caching. What effect does this have on forum users. Is it really something of significant benefit to have caching or is it something of minor convenience?
It is primarily a performance thing, your users are unlikely to notice a significant difference.
Appreciated. :D