show_db_error

Description

Called by db_fatal_error() function (in Errors.php.)

Syntax

void show_db_error (void $param1)



Parameter $param1

Expected type: Void
Description:


Notes

  • Shows a complete page independent of language files or themes.
  • Used only if there's no way to connect to the database or the load averages are too high to do so.
  • Emails the admin about the issue if they've requested it, but only if it's been at least 72 hours since the last email and the forum isn't in maintenance mode
  • Includes an error message from MySQL if one is available
  • Updates db_last_error to record the timestamp when the last email was sent
  • Tries to cache the db_last_error info for 5 minutes (avoids making a load average problem even worse)
  • Writes the db_last_error info to Settings.php if caching isn't successful
  • Outputs an appropriate message based on whether it's a connection issue or a load average issue
Advertisement: