Log in

View Full Version : Hide SQL errors from users


Jolten
12-27-2004, 08:15 AM
Hi,

When an sql error occurs the query is shown to any user or guest. I'd like to hide these queries from everyone but admins. Is that possible? OR even hide them entirely and let the email error reporting send the email to admins.

Paul M
12-27-2004, 10:49 AM
3.0.3 seems to do this by default ?

Xenon
12-27-2004, 02:35 PM
yep, that's by default, but it is still viewable within the page source.

to avoid that as well, just open db_mysql.php and delete the following lines: else
{
// display hidden error message
echo "</blockquote>\r\n\r\n<!--\r\n" . htmlspecialchars($message) . " -->";
}

Paul M
12-27-2004, 03:23 PM
True, but few people know that - also - you could just comment out the echo line in that code above. :)