Saturday, August 24, 2019

How to hide/disable deprected errors in PHP?

If you want to hide/disable deprecated all errors/notices completely. Please add the following line into your php.ini file or your setting.php file as per your framework.

For examples : If you use PHP then add below line to php.ini or you use osCommerce please add below line to application_top.php file.

  For php.ini file :

  ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);

  For WAMP server : 
  Please open php.ini file amd use below line

  error_reporting = E_ALL & ~E_NOTICE

  For osCommerce site :

  error_reporting(E_ALL & ~E_NOTICE);

  For wordpress site :

  error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
  OR
  error_reporting(E_ALL ^ E_DEPRECATED);

  Now, All errors/notices will be hide/disable.

No comments:

Post a Comment

Popular Posts