Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

closed as off topic by MDMarra, Scott Pack, Ward, voretaq7 Nov 4 '12 at 4:03

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

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

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.

share|improve this answer
E_STRICT isn't even listed as an option in php.ini, and setting the value manually just seems to ignore it. – Mark G. Feb 23 '11 at 23:33
Hmmm, Ok... Maybe MAMP changed something to it... Try the edit above. – Bart De Vos Feb 24 '11 at 0:35
Have you confirmed that you are editing the correct php.ini using phpinfo(); ? – BrianAdkins Jul 12 '12 at 11:23
The solution really is editing the right .ini file, and phpinfo() was spot on!, I just edited the right ini and it solved my problem, thanks! – jackJoe Feb 3 '13 at 12:01
  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.

share|improve this answer
Although now I see that you tried php_ini function... – BrianAdkins Jul 12 '12 at 12:04

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!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.