using php.ini disable all errors and warnings and notices

using php.ini disable all errors and warnings and notices
LVL 1
rgb192Asked:
Who is Participating?
 
Ray PaseurConnect With a Mentor Commented:
This will do it in the code, and I am fairly sure there is a corresponding setting in the php.ini file:
ini_set('display_errors', FALSE);

I recommend against using error_reporting(0) because you still want to see the error logs, even if you do not show the errors to the client browser.

Best regards, ~Ray
0
 
bartvdCommented:
error_reporting(0);
0
 
Lukasz ChmielewskiCommented:
I'd recommend also reading this:
http://php.net/manual/en/errorfunc.configuration.php

may come in handy in the future.
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
Mohamed AbowardaSoftware EngineerCommented:
error_reporting(E_ALL);

Open in new window

0
 
Mohamed AbowardaSoftware EngineerCommented:
You can also try:
error_reporting(E_ALL | E_STRICT);

Open in new window

0
 
Mohamed AbowardaSoftware EngineerCommented:
Sorry, the comment was duplicated.
0
 
AngelKihaCommented:
If memory serves, in the php.ini, search for "display_errors".
Change it from "On" or "stderr" to "Off"

If it doesn't exist, add the following to the end:
display_errors = Off
0
 
rgb192Author Commented:
best answer because it solves browser and log
0
All Courses

From novice to tech pro — start learning today.