Welcome Guest, Not a member yet? Register   Sign In
How to hide database error?


I want to hide any database error like 1064 or 1054

exa :
A Database Error Occurred
Error Number: 1054

Unknown column ‘abc’ in ‘field list’

INSERT INTO `table1` (`ID`, `ss`, `jj`, `abc`)

as we know it shows defected query with table name and fields.
Is there any way to redirect that page to some other decorative error page?
I dont want to show any kind of database table name or error on site?


Set db_debug to FALSE in application/config/database.php

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

More info in the Database configuration documentation.

Thank you very much.
Its stops displaying database errors.

but can we redirect this to some other page?

I got answer for that.
In application/errors, there are all error files. i have put redirection code in each file to my custom error page. this way it works. other way is we can modify existing error pages also the way we like.

Thank you.

Theme © iAndrew 2016 - Forum software by © MyBB