denoteone Posted July 29, 2010 Share Posted July 29, 2010 I am using the classic ini_set("display_errors","2"); ERROR_REPORTING(E_ALL); but I am getting a notice that is posting on my page. I preffer not to remove the reporting yet since the site is still new and is there any way I can hide the notice but keep the fail errors the error is Notice: Undefined index: HTTPS in /var/www/website/visitors.php on line 20 line 20 is if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} Link to comment https://forums.phpfreaks.com/topic/209231-hide-notice-coming-from-error-reporting/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2010 Share Posted July 29, 2010 display_errors should be OFF for a live site. log_errors should be ON so that you capture the errors into the log file. Also see the error_log setting that determines where the errors are written to. Link to comment https://forums.phpfreaks.com/topic/209231-hide-notice-coming-from-error-reporting/#findComment-1092580 Share on other sites More sharing options...
DavidAM Posted July 29, 2010 Share Posted July 29, 2010 PFMaBiSmAd is correct BUT you should also fix the error ( in my book a notice is an error ) if ( (isset($_SERVER["HTTPS"])) and ($_SERVER["HTTPS"] == "on")) {$pageURL .= "s";} Link to comment https://forums.phpfreaks.com/topic/209231-hide-notice-coming-from-error-reporting/#findComment-1092770 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.