HELP!!

Started by Bec, May 07, 2008, 05:25:20 PM

Previous topic - Next topic

Bec

Quote from: MrPhil on May 17, 2008, 10:08:40 PM
Quote from: Bec on May 17, 2008, 05:16:33 PM
This is what is on line 54 - $db_last_error = 1209795132;

That's the timestamp of the last database error reported. Why don't you try the fix I proposed here and let us know if it works for you. Since you're having frequent DB failures, it shouldn't take too long to see how it does. If it doesn't work correctly, perhaps we can take it offline via PMs (or in the other thread) until I get the code working right.

ok ill give it a go and keep you informed! cheers!

MrPhil

Quote from: Bec on May 18, 2008, 01:09:13 AM
**update ok, ive just found the error pages you are talking about, just created 404 do i just leave these blank?

I wouldn't have a blank 404.shtml. That file is HTML code to display a page telling a visitor what went wrong when they tried to access something, so a blank one would not be good. It's just a simple HTML page with some server side includes (thus the ".shtml" extension) to give information on what page was requested, etc. You can start with the template produced by cPanel and go from there. You can also use PHP or plain HTML, but then you need to add ErrorDocument 404 name-of-file to your .htaccess file.

MrPhil

Quote from: Bec on May 18, 2008, 01:11:41 AM
Quote from: MrPhil on May 17, 2008, 10:08:40 PM
Quote from: Bec on May 17, 2008, 05:16:33 PM
This is what is on line 54 - $db_last_error = 1209795132;

That's the timestamp of the last database error reported. Why don't you try the fix I proposed here and let us know if it works for you. Since you're having frequent DB failures, it shouldn't take too long to see how it does. If it doesn't work correctly, perhaps we can take it offline via PMs (or in the other thread) until I get the code working right.

ok ill give it a go and keep you informed! cheers!

Great! I need some feedback on whether my code works for real DB errors, and since you seem to have frequent DB errors, your site would be the perfect testbed. Something you might do is set up a cron job to email you the content of /LastError.php every couple of hours, to see if it's changing and if it's correctly updated. The cron job command would be cat /home/buctai8/public_html/forum/LastError.php (adjust to reflect your file structure). Feel free to PM me to take this offline if you wish.

xrunner

Whew! This thread just saved my butt! Had to copy the backup settings.php which fixed it. Nasty!

MrPhil

Bec, did you get a chance to try my changes? Did they help at all? Monitoring the content and date of LastError.php, do you see that it's being updated on any regular basis? Most importantly, has your forum stopped crashing because Settings.php got wiped out?

I sent you a PM after a week or so, but you didn't respond. I'd really like to get some feedback on whether this work fixes a very nasty and longstanding problem, and I'm sure the developers would like to know too. Thanks!

Bec

Phil apologies I havent received any pm. Sorry i havent tried your changes as everything has been fine lately, seems everything was fixed when i did the error files and favicon... sorry!

MrPhil

Interesting. I guess it's yet another thing broken in SMF 2 (did you go into My Messages > Read Your Messages? SMF no longer tells you that you have unread messages).

Anyway, glad to hear that the other stuff fixed the problem (though I can't figure out how). Maybe your host fixed a glitch in MySQL or PHP at the same time (no more DB errors) and it's just coincidence?

Bec

ive received other pm's but nothing from yourself, so maybe.

thanks. maybe coincidence, im not sure im just glad its stop crashing! thanks again for your help

Advertisement: