Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

session problems on mamp

Tags:

session

mamp

I have a problem with sessions, my php code works perfectly on easyPhp but not on MAMP. With easyPhp I have to modify the php.ini file from session.auto_start = 0 to session.auto_start = 1. What should I do to make it work with MAMP?

like image 759
Rick Owens Avatar asked Aug 22 '26 09:08

Rick Owens


1 Answers

For MAMP, the default php.ini setting is session.auto_start = 0. So I'm assuming you wish to modify it to session.auto_start = 1 as you did for easyPHP.

In order to do so, follow these steps:

  1. Start MAMP
  2. File > Edit Template > PHP > [select php.ini file]*
  3. Find the line that says: session.auto_start = 0
  4. Change it to session.auto_start = 1
  5. Save the file
  6. Restart your MAMP server

Once you change any of the MAMP configuration defaults, MAMP will generate an appropriate configuration file in the following subdirectory: ~/Library/Application\ Support/appsolute/MAMP\ PRO/templates/, so you can edit those files directly, instead of going through MAMP.

* The php.ini file you select should match the version you're running through MAMP (selected under server > PHP, in the main window).

like image 50
Paul Sobocinski Avatar answered Aug 25 '26 07:08

Paul Sobocinski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!