naveendk.55 Posted October 14, 2011 Share Posted October 14, 2011 How to turn off notices in PHP 5.3. Is it possible to turn it off in php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/ Share on other sites More sharing options...
ZulfadlyAshBurn Posted October 14, 2011 Share Posted October 14, 2011 what you mean notices? error reporting you mean? Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279251 Share on other sites More sharing options...
ZulfadlyAshBurn Posted October 14, 2011 Share Posted October 14, 2011 you can choose to include this in every php pages <?php // Turn off all error reporting error_reporting(0); ?> or you can edit it in your php.ini Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279252 Share on other sites More sharing options...
naveendk.55 Posted October 14, 2011 Author Share Posted October 14, 2011 I Want only to disable the NOTICES but want to enable the error reporting. Does your code also disable error reporting? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279253 Share on other sites More sharing options...
ZulfadlyAshBurn Posted October 14, 2011 Share Posted October 14, 2011 set display_errors in your php.ini display_errors = Off Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279255 Share on other sites More sharing options...
naveendk.55 Posted October 14, 2011 Author Share Posted October 14, 2011 Doesn't it also disable the warning and errors? Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279282 Share on other sites More sharing options...
trq Posted October 14, 2011 Share Posted October 14, 2011 php.ini files are well commented. Read it. Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279311 Share on other sites More sharing options...
AyKay47 Posted October 14, 2011 Share Posted October 14, 2011 to display only notices and not warnings or errors.. error_reporting(E_NOTICE); but it makes no sense as to why you would want to do this.. every type of warning, error or notice can be helpful and most of the time essential in debugging your code.. Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279313 Share on other sites More sharing options...
Buddski Posted October 14, 2011 Share Posted October 14, 2011 Apparently nobody reads the OP these days He wants to DISABLE PHP NOTICES error_reporting(E_ALL ^ E_NOTICE); This will report all errors EXCEPT for E_NOTICE Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279354 Share on other sites More sharing options...
AyKay47 Posted October 14, 2011 Share Posted October 14, 2011 shoot you're right.. i feel dumb.. still.. notices should not be ignored.. Quote Link to comment https://forums.phpfreaks.com/topic/249099-turn-off-notices/#findComment-1279355 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.