MAMP php5 strict standards

I am trying to set error_reporting to E_ALL & ~E_STRICT in php.ini of mamp.

But this is not getting affected at all. I confirmed that I am editing right file by setting different error_reporting like E_NOTICE and checked phpinfo to verify the same.

But only ~E_STRICT is not happening.

When I visit my cms (concrete5) it gives me a list of strict errors ( pasting first few below ):

Strict Standards: Non-static method Cache::get() should not be called statically in www/concrete/models/package.php on line 78

Strict Standards: Non-static method Cache::key() should not be called statically in www/concrete/libraries/cache.php on line 117

Strict Standards: Non-static method Cache::getLibrary() should not be called statically in www/concrete/libraries/cache.php on line 121

tried to set error_reporting to E_ALL & ~E_STRICT in .htaccess and also index.php file. none worked.

Solution please.


Concrete5 has a setting that will suppress display of errors and warnings (and notices I presume) -- in the Dashboard -> System & Settings -> Environment -> Debug Settings. It's possible that you have this set to hide all errors/warnings -- which will override your settings in the config file.

As for @PeeHaa's comment about suppressing errors instead of fixing them, well it's not as simple as that because the Concrete5 CMS itself has a TON of php that will generate notices. I assume this is because of code that was written years ago before certain things were deprecated. For example, there are a ton of system functions that get called statically even though the function is not declared as "static". This was an okay thing to do in older versions of PHP but is now frowned upon. Unfortunately I don't think there's anything you can do about this.

This is unfortunately one of the trade-offs with using Concrete5. It's the best CMS out there, but it is not always the most sophisticated platform for more advanced developers.


It's very tricky to get Concrete5 to ignore these errors and load a page (including the Dashboard). Your best bet is to downgrade PHP to the latest 5.3.X until a PHP 5.4.X compatible version is released.


I got this resolved by moving from mamp to xampp on my imac.

issue with mamp: it does not allow us to use php 5.3 unless we have mamp pro

solution that I used: I moved to xampp with php 5.3 and everything worked smooth.

链接地址: http://www.djcxy.com/p/58922.html

上一篇: 在htaccess中禁用php函数

下一篇: MAMP php5严格标准