2

For some reason, MAMP won't allow me to turn off E_STRICT warnings. I've tried everything from changing the value explicitly in php.ini to error_reporting(E_ALL & ~E_STRICT) in my file... to explicitly saying php_ini('error_reporting', E_ALL & ~E_STRICT). I'm entirely confused as to why this is happening, and from what I can tell its specific to MAMP.

The version of PHP I'm running is 5.2.13 - and before you start telling me I shouldn't be ignoring those warnings, lets just be clear that I am using a framework that requires that E_STRICT be ignored. (lame, I know.)

Mark G.
  • 131
  • 1
  • 7
  • 1
    I am having the same issue. Tried adding in htaccess and event using error_reporting(); in index.php Nothing worked. @Mark37 please post the solution. – kck Jul 12 '12 at 11:16

3 Answers3

3

Try editing your php.ini (line 270)

error_reporting  =  E_ALL & ~E_STRICT

If that fails, try it by editing the .htaccess file in the root-folder

php_value error_reporting 6143

If even that fails, look for the line 'display_errors = Off' and change it to:

display_errors = Off

Be careful, sometimes there is more then one occurrence.

Bart De Vos
  • 17,761
  • 6
  • 62
  • 81
0
  1. Make sure you are editing the correct php.ini by checking with phpinfo();

  2. Make sure you restart apache to apply the new settings

... Only suggesting these since they are not explicitly stated in the question, but you've probably done both.

Brian Adkins
  • 420
  • 3
  • 7
0

Ok so I've found a solution for this.
I had exactly the same problem and this is how I've fixed it:

1) create a vhost in MAMP (not sure if necessary but this way it works)
2) inside the vhost config, you add this line:

php_admin_value error_reporting 6143

Notice its php_admin_value instead of php_value ? This changes everything!

3) restart MAMP and profit!

xtrimsky
  • 123
  • 1
  • 3
  • 12