Welcome Guest, Not a member yet? Register   Sign In
error_reporting(0) --> still shows DB-errors
#1

[eluser]sl3dg3hamm3r[/eluser]
Hey there

I just set error_reporting(0) (instead of E_ALL) in index.php, as it is suggested for a public environment. Then I broke on purpose an sql-statement - it still shows it within the browser (including the whole sql-statement). What else do I need to change? That would be a big security-issue if everybody could see the DB-sheme Sad

sl3dg3
#2

[eluser]Dam1an[/eluser]
In the database config file, set db_debug to false
#3

[eluser]wiredesignz[/eluser]
Set "db_debug" to FALSE in config/database.php also.

EDIT:
Two for the price of one. Wink
#4

[eluser]sl3dg3hamm3r[/eluser]
ah yes, there we go... thx.
#5

[eluser]sl3dg3hamm3r[/eluser]
Hmm... I don't get it - why is it not logged anymore? I would have expected at least the log-entry, when db_debug is set to false.
#6

[eluser]Unknown[/eluser]
Got the same problem too...camping here for answers
#7

[eluser]louis w[/eluser]
error_reporting is for php errors. The database error comes from the application (Code Igniter) hence why you have to disable it in the database config file.
#8

[eluser]sl3dg3hamm3r[/eluser]
[quote author="louis w" date="1249434503"]why you have to disable it in the database config file.[/quote]?

What I want:
- no sql-errors in the browser shown, which would reveal sensitive data about the sheme in a productive environment
- sql-errors should be still logged in the log-file
#9

[eluser]Yash[/eluser]
Just check config file.

/* 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 1;

it should work for you. rest you have already done.
#10

[eluser]sl3dg3hamm3r[/eluser]
Well, I have the threshold set to 1. But still, if I disable db_debug, no log-entry is generated if I have a SQL-error... Sad




Theme © iAndrew 2016 - Forum software by © MyBB