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 :

MAMP/bin/php/php5.3.6/conf/php.ini

Default php.ini file :

Change to :

Then stop and restart MAMP !

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

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

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

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>