News:

Wondering if this will always be free?  See why free is better.

Main Menu

Website being knocked off-line by cache file?

Started by Mark S, October 19, 2013, 06:36:02 PM

Previous topic - Next topic

Mark S

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?

Bigguy

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.

Arantor

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.

Bigguy

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 ;) )

Mark S

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?

Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

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.

Colin

I wasn't aware of this being a known bug. Thanks Arantor.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Bigguy

Thanks Arantor. That pretty much scratches what I was going to say I guess. :)

Arantor

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 :(

Mark S

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?

Mark S

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.

Arantor

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.

vbgamer45

What about just removing the cache  for modSettings in SMF 2.0 in a patch since it doesn't work right anyway.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

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.

Mark S

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?

Arantor

It is primarily a performance thing, your users are unlikely to notice a significant difference.

Mark S


Advertisement: