Jump to content

Disable error reporting ?


Rommeo

Recommended Posts

For example when I enter wrong data for one textbox, lets say I typed digits instead of chars. mysql gives me an error like "wrong entry... WHERE workername=125 and male=yes on line 25".. etc as I read this may cause security problems. I dont have this much simple mysql warnings but I want to disable to print mysql error warnings.

 

Is there anyway to do it ?

Link to comment
https://forums.phpfreaks.com/topic/227393-disable-error-reporting/
Share on other sites

I agree with jesirose's basic advice.  For a production server, you should turn this off http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors.  You should however log errors to a log file.

 

With that said, if you are using mysql error handling those are not php errors.  So if you're doing this or something similar:

 

if (!$result)  {
  echo mysql_error();
} else {

 

then you need to instead, write that to an error log of your own making. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.