MyBB Community Forums

Full Version: How do i hide sql error messages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I disable verbose sql errors in mybb. they're giving away too much information
Go to your forum's settings > Server and Optimization Settings

Logging medium: Log and email
Error type medium: Hide Errors and Warnings
Error logging location: ./error.log (or to any path relative to your forum root where you want errors to be logged)

! Make sure you disallow access to error.log from the browser. If you're using Apache, add this to your htaccess file (note: this will block access to all files ending in ".log"):

<Files  ~ "\.log$">
  Order allow,deny
  Deny from all
</Files>

CHMOD the file to 644 so that it can be written to. Now it will be inaccessible over the web, but you can download it via FTP. You'll also have errors emailed to your admin address.