About
Pricing
Community
Teams
Start Free Trial
Log in
stargateatlantis
asked on
6/22/2015
php.ini hide notices and warnings
In my php.ini I am trying to show errors only but not warnings. Her is some settings I have below.
display_errors = On
and
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING
But notices and warnings still show up
PHP
Apache Web Server
3
1
Last Comment
Ray Paseur
8/22/2022 - Mon
Ray Paseur
6/22/2015
Those constants may or may not work. Check this link.
http://php.net/manual/en/configuration.changes.php
See also:
http://php.net/manual/en/errorfunc.configuration.php#ini.error-reporting
What you might want to do is
log
errors, warnings and notices, but not show any of them to clients. Maybe something like this:
error_reporting = 32767
display_errors = Off
log_errors = On
log_errors_max_len = 1024
error_log = error_log
If you want a script that can find the error logs, just post back and I'll put it here.
stargateatlantis
6/22/2015
ASKER
So this will disable show warnings
ASKER CERTIFIED SOLUTION
Ray Paseur
6/22/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61
http://php.net/manual/en/configuration.changes.php
See also: http://php.net/manual/en/errorfunc.configuration.php#ini.error-reporting
What you might want to do is log errors, warnings and notices, but not show any of them to clients. Maybe something like this:
error_reporting = 32767
display_errors = Off
log_errors = On
log_errors_max_len = 1024
error_log = error_log
If you want a script that can find the error logs, just post back and I'll put it here.