PHP set cookie localhost not working MAMP

In case you can’t set a cookie from PHP when testing locally (localhost) with MAMP, you have to check « output_buffering » in your php.ini file.

Go to the right MAMP folder  that contains the php.ini file. Be careful, there is probably several directories related to php.

On my Mac (MAMP 2.0.5), the path is :


Default php.ini file :

Change to :

Then stop and restart MAMP !

Website Pin Facebook Twitter Myspace Friendfeed Technorati Digg Google StumbleUpon Premium Responsive

This entry was posted in IT Tech stuff. Bookmark the permalink.

9 Responses to PHP set cookie localhost not working MAMP

  1. JayMan says:

    I was having the same problem. This made it work. Thank you!

  2. Quentin says:

    Thank you !! I wish I found that before I lost 2 days screaming at PHP ^^’

  3. Nilesh says:

    suffering same problem, solved now thanks.

  4. Louis says:

    Thanks you, I find you after 2 hours.. Thanks again

  5. Swar Patel says:

    Thank you so much
    it helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>