Customizing SMF > SMF Coding Discussion
Error handling and SSI.php
bulliedog:
I am using SSI.php to include recent forum posts on the main page of my site (not the forum index). On rare occasions my MYSQL server fails or SMF is unable to connect to the DB for some reason. When this occurs I get an error message when trying to access my main site page (or any other page that uses SSI.php for that matter) - just the standard one line on white background.
Is there some way that I can code error handling into my pages to just ignore the errors if the DB is not available and just output the rest of the page?
James
[Unknown]:
Good idea, it can just return with nothing... hmm...
-[Unknown]
bulliedog:
--- Quote from: [Unknown] on June 22, 2004, 05:36:04 PM ---Good idea, it can just return with nothing... hmm...
-[Unknown]
--- End quote ---
Are you "hmmm-ing" because you are thinking that this should be implemented or because you think this should be very easy to do and I should just do it myself ???
[Unknown]:
Hmmmm...
-[Unknown]
bulliedog:
Okay, so I am back to trying to figure this out again. I have found that I can change the E_ALL in SSI.PHP to a 0 to prevent the error message from showing but then I just get a blank page.
I should be able to come up with some sort of redirect to a page that tells the user that we are experiencing temporary problems and to try back later or similar right? Would I (better yet, should I?) include this change into SSI.PHP or is there a better way?
Navigation
[0] Message Index
[#] Next page
Go to full version