PinoyTech.org

CodeIgniter, Kohana, Mootools, jQuery and CSS

How To Turn Off Displaying of MySQL Errors in CodeIgniter

Posted by teejay on March 30, 2010

As programmers, showing off sensitive information is a 'no-no'. MySQL errors are one way of non-intentional way of displaying sensitive information. Normally we would fix the problems before they arise but like everything else, you can't be too sure.

Here's what you do to turn off MySQL errors from being shown on screen.

Normally, in our database config file, database.php, we would have this:

$db['default']['db_debug'] = TRUE;

Turn this off and voila! you just disabled the showing of MySQL errors on screen.

$db['default']['db_debug'] = FALSE;

Categories: How To, Web Development

Tags: codeigniter

1 Comments

napz

Wow another additional wisdom! hehehhe Thanks bro keep on posting….. I have your website bookmarked…

I have another CI mentor…!

April 22nd 2010

Comments are not allowed