PHP 5 disable strict standards error
Do you want to disable error reporting, or just prevent the user from seeing it? It’s usually a good idea to log errors, even on a production site.
# in your PHP code:
ini_set('display_errors', '0'); # don't show any errors...
error_reporting(E_ALL | E_STRICT); # ...but do log them
They will be logged to your standard system log, or use the error_log
directive to specify exactly where you want errors to go.
Disabling Strict Standards in PHP 5.4
As the commenters have stated the best option is to fix the errors, but with limited time or knowledge, that's not always possible. In your php.ini change
error_reporting = E_ALL
to
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
If you don't have access to the php.ini, you can potentially put this in your .htaccess file:
php_value error_reporting 30711
This is the E_ALL value (32767) and the removing the E_STRICT (2048) and E_NOTICE (8) values.
If you don't have access to the .htaccess file or it's not enabled, you'll probably need to put this at the top of the PHP section of any script that gets loaded from a browser call:
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
One of those should help you be able to use the software. The notices and strict stuff are indicators of problems or potential problems though and you may find some of the code is not working correctly in PHP 5.4.
How to eliminate php5 Strict standards errors?
One of the changes in php 5.4 is that E_STRICT is now part of E_ALL
So, in your /cake/bootstrap.php you could remove the E_STRICT from your error reporting:
error_reporting(E_ALL ^ E_STRICT);
and be compatible again with before 5.4 versions.
Unable to turn off strict standards warnings, XAMMP, PHP 5.4.7
It's possible that this third-party software you mention overrides the error reporting level itself after you and therefore "wins". Check for this and if that's what happens, configure it appropriately or make sure to override the settings last.
Related Topics
Passing JavaScript Variable to PHP Using Ajax
PHP Carbon, Get All Dates Between Date Range
Setting PHP Tmp Dir - PHP Upload Not Working
How to Call the Constructor with Call_User_Func_Array in PHP
How to Check If $_Get Is Empty
Pdostatement (Mysql): Inserting Value 0 into a Bit(1) Field Results in 1 Written in Table
Mcrypt Rijndael-128 to Openssl Aes-128-Ecb Conversion
How to Can Post a Multiple Photos via Facebook API
Remove Item from Array If It Exists in a 'Disallowed Words' Array
How to Add a New Method to a PHP Object on the Fly
PHP Can't Connect to MySQL with Error 13 (But Command Line Can)
Directory Index Forbidden by Options Directive
Remove Index.Phproute=Common/Home from Opencart