简体   繁体   中英

Can't disable Strict Standards errors in Runtime

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 ...

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM