SMF Support > SMF 2.0.x Support
Maintenance Mode disabled after saving other settings
phantomm:
Today I ran to small problem.
I installed fresh SMF 2.0.2, added Polish language and new theme (modified Inferno by DS). After that I enabled Maintenance Mode and while later changed some options in Cookies and Sessions. I was surprised that someone (spammer :P) actually posted something on my site, because I thought that site is disabled. So I checked settings and another surprise - Maintenance Mode is not active
Then I made this tests:
Go to: Administration Center » Server Settings » General
Enable Maintenance Mode
Now go to: Administration Center » Server Settings » Database and Paths
Save settings (don't change anything)
Go to: Administration Center » Server Settings » General
Maintenance Mode is disabled.
Lets do it again:
Go to: Administration Center » Server Settings » General
Enable Maintenance Mode
Now go to: Administration Center » Server Settings » Cookies and Sessions
Save settings (don't change anything)
Go to: Administration Center » Server Settings » General
Maintenance Mode is disabled.
Wasn't sure if this is something for bugs board, so now it's here. If this is SMF bug please move this thread to proper board:)
MrPhil:
Just to be sure, after you Enable maintenance mode, have you checked to confirm that it is, in fact, enabled? In Settings.php, you should see $maintenance = 1; (or maybe 2), and only the Admin can get in on 1 (and not even that on 2). Are you seeing $maintenance set back to 0 without your explicitly doing that?
I suppose it's possible that SMF could be automatically clearing maintenance mode to 0 after certain settings-related operations, so that admins don't forget to clear it manually, but that would not be a logical thing to do. More likely there's a bug in the code that reports to you whether it's in maintenance mode or not, or that it's failing to put the forum into that mode.
Your Settings.php isn't read-only, is it? (444 permissions, or similar) That would prevent it from being put into maintenance mode in the first place.
phantomm:
--- Quote from: MrPhil on June 24, 2012, 10:59:47 PM ---Just to be sure, after you Enable maintenance mode, have you checked to confirm that it is, in fact, enabled? In Settings.php, you should see $maintenance = 1; (or maybe 2), and only the Admin can get in on 1 (and not even that on 2). Are you seeing $maintenance set back to 0 without your explicitly doing that?
--- End quote ---
Yes, it is enabled, in Settings.php I have $maintenance = 1;, and in theme is information about enabled maintenance mode
--- Quote from: MrPhil on June 24, 2012, 10:59:47 PM ---Your Settings.php isn't read-only, is it? (444 permissions, or similar) That would prevent it from being put into maintenance mode in the first place.
--- End quote ---
Settings.php has CHMOD 644
MrPhil:
644 isn't necessarily writable by SMF (PHP), if PHP isn't running as "owner". If SMF was able to change $maintenance, then presumably 644 is OK (writable). Otherwise it might need to be 664 or even 666.
phantomm:
yeah SMF changed setting in file, so file is writable
Navigation
[0] Message Index
[#] Next page
Go to full version