Problem with E_STRICT after server move
Permalink 1 user found helpfulWe are running PHP 5.4.3.
When accessing the site I get the following error:
Strict Standards: Non-static method Cache::get() should not be called statically
I have edited php.ini and changed the settings to:
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
But I still get the errors.
The weird thing is that if use:
outside of concrete5, I get 24567 but If I add those lines to my template in concrete5, I get 245671.
Seems like Concrete5 is setting display_errors to 1 even though they are hidden in php.ini.
Where can I change this?
My question is, how can I update if I can't load the site and get to the dashboard?
I am guessing that trying to call index.php/tools/required/upgrade will have the same errors. Is that correct? I am reluctant to experiment too much until I am sure what will work.
2. Rename the /concrete/ folder from root to for example /concrete_bak/.
3. Upload the new /concrete/ folder to your FTP site.
4. Then run the upgrade script fromhttp://www.yoursite.com/index.php/tools/upgrade.php...
<?php defined('C5_EXECUTE') or die("Access Denied."); $debug_level = Config::get('SITE_DEBUG_LEVEL'); switch($debug_level) { case DEBUG_DISPLAY_ERRORS: if(defined("E_DEPRECATED")) { error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); // E_DEPRECATED required for php 5.3.0 because of depreciated function calls in 3rd party libs (adodb). } else { error_reporting(E_ALL ^ E_NOTICE); } ini_set('display_errors', 1); break; default: if(defined("E_DEPRECATED")) { error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
So every site, my ini's settings are being overwritten by Concrete5, and it would kinda stink to go through every new install and every existing install to change this page's code. Does anyone have any ideas on how to override Concrete5's PHP code in the php.ini?
http://serverfault.com/questions/375992/hide-strict-errors-on-php-5...
According to that site in PHP 5.4 E_STRICT is now part of E_ALL.
But that setting did not help.
I think the problem is that concrete5 is setting E_ALL when my site is in development mode. And that is a problem with PHP 5.4 because E_STRICT is now part of E_ALL.
Any suggestions?
UPDATE: I was running C5 5.5.1. Noticed that this might be fixed in newer versions of C5.