News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Cache file for mod-settings.php constantly corrupts, and makes forum unusable

Started by neilbombd, March 10, 2011, 10:31:10 AM

Previous topic - Next topic

neilbombd

Running RC4 with the RC5 security patch.  This has been happening on my forum for many months now, though, and is the same error that this user also had.

Its been particularly frequent today, causing me to have to log into the FTP and delete the file from the cache directory.

What happens is that my entire forum becomes unavailable, and I get a white screen with the following message:

Quote
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/cookd/public_html/forums/cache/data_d9e8efebd2f7fb9cbd8d03d1653016a1-SMF-modSettings.php on line 1

Parse error: syntax error, unexpected ':' in /home/cookd/public_html/forums/cache/data_d9e8efebd2f7fb9cbd8d03d1653016a1-SMF-modSettings.php on line 1

Sometimes this seems to rectify itself, if you wait long enough.  When I open the cache file, when it is giving this error, I can see that it hasn't cached the whole file.  It has only cached the first line, and this is why it's giving an error. 

Is there a way to either disable caching for this one file - it never affects any others - or can I make it so that my forum will not be brought to a stand-still when the error occurs

gamesmad

You could create the cache file, and then CHMOD it so that it can't be edited/removed, then it can't become corrupted.

Might possibly throw some errors in your error log though.
1 on 1 SMF Help - Want 1 on 1 SMF Help? Post in Help Wanted or drop me a message!

Go Charter! - Please consider becoming a charter member to support SMF development.

Please do not PM me with general questions, posting in the appropriate board will ensure everyone benefits from the advice given.

Arantor

QuoteYou could create the cache file, and then CHMOD it so that it can't be edited/removed, then it can't become corrupted.

Which would spew errors and cause things to become out of date since a ton of stuff is cached in that file.

Better solution would be to disable file caching entirely.

neilbombd

I suppose I might as well just turn file caching off now, as I only had it enabled for the iphone skin mod, and that never actually worked properly anyway.

Is file caching worth keeping on at all, given I've removed the iphone skin mod?

Arantor

Ideally it should be on because it usually boosts performance. But if it's misbehaving it's OK to leave it off.

thatjustit

Is there no other way to fix this issue than disabling the cache feature?

Arantor

What version are you on? At some point in the last couple of versions, the cache code was tweaked to hopefully resolve the issues.


Arantor

That's not the person who asked today. This topic originally hails from 2011 when those were semi-current.

That said... if the person who asked today has the site as per his website link in his profile, that is also running RC4 and firmly in need of updating it.


Advertisement: