0

I want to disable all PHP erros or prevent them to be displayed, but Strict Standard errors insist on showing up.

I'm adding this (though two line are redundant)

ini_set('error_reporting', 0);
ini_set( "display_errors", 0 );
error_reporting(0);

My application is hosted on OpenShift and running PHP 5.4.

EDIT

Just realized it's not the only kind of error being thrown. I added a syntax error (omitted a ;) and it showed the error.

Parse error: syntax error, unexpected ...

Victor Ferreira
  • 6,151
  • 13
  • 64
  • 120
  • 3
    You have to checkout where did you have placed the previous code. If you have some code before the above code is regarded, the errors of that code should be displayed. – SaidbakR Feb 21 '16 at 23:43

1 Answers1

1

Taken from https://stackoverflow.com/a/1248996/1027877

in your PHP code:

ini_set('display_errors', '0');     # don't show any errors...
error_reporting(E_ALL | E_STRICT);  # ...but do log them

You can have this in your htaccess file

php_flag display_errors off
Community
  • 1
  • 1
Marcel Djaman
  • 1,276
  • 1
  • 17
  • 34