About   |   Projects   |   Elsewhere   |   Work   |   Feeds   |   Contact

Tweaking MAMP Pro settings

I’ve started using MAMP Pro to run local Apache and MySQL servers on my Macbook, mainly because they’ve got a rather more user-friendly front-end when it comes to controlling the most-commonly needed configuration settings. Being able to switch DocRoots and database directories is quite handy when you’re bouncing from project to project.

MAMP Pro is basically MAMP with a lot more of the configuration exposed through a GUI, and for $20 or so I figured it was worth it. Installation is the usual drag-and-drop Mac affair, and stopping and starting the servers is nothing more than a mouse-click.

The problem arose when I tried to run a MediaWiki install, whereupon it immediately fell over complaining of lack of memory available for PHP. By default PHP5 allocates a maximum of 8Mb, which is nowhere near enough for MediaWiki. Changing it is simply a matter of amending the php.ini file and restarting the servers – or so I thought. MAMP had other ideas – every time the server was restarted, it overwrote my amended file, started up PHP with the usual 8Mb and MediaWiki promptly fell over.

This was driving me nuts until I hit upon having a look inside the application itself. If you right-click an application in the Finder and select the ‘Show Package Contents’ option, you get to peer inside the app itself, or at least access the component and configuration files associated with it. In MAMP’s case, that allows you to get hold of the original version of php.ini and be able to edit it – it’s hidden inside the ‘Resources’ folder, but can be edited at will. Alter this to the required values, restart the servers again and away you go.

4 October 2007

Technical

21 comments

21 Comments

  1. peterpoe says:

    thank you! The hidden php.ini was driving me mad too!

  2. severin says:

    Hi Tim,

    there is a better way to edit the php.ini template. Just use the menu File > Edit Template > PHP5 php.ini.

    Thanks,

    severin

  3. Temeq says:

    Thanks guys!
    Just was going nuts too.

  4. Alan says:

    Thanks! You saved me hours…

  5. scott says:

    thanks a lot for this info. amazingly it was exactly what i was looking to do, to edit the memory limit.

    i tried editing the template through file > edit template, but nothing happens when I click on this. Anyway, I got what I wanted thanx to your insight

  6. Great, thanks, you’ve answered my question exactly. Fabulous. :)

  7. Eric says:

    I was getting very frustrated with this problem… thanks for posting the answer.

  8. I was having the same problem, ty for the solution.

  9. Stefan says:

    Thank you, saved me quite a few hours here. I was just about to throw my PC out the window… ;)

  10. Thanks a lot ! It was driving me mad for about 2 hours

  11. Jeff says:

    Thank you! I too was very frustrated over this until I Googled your post. Thanks for sharing the info.

  12. Aaron Klump says:

    I tried editing the template and it worked. But when you do edit it, you have to:

    1) hit apple-save
    2) restart the server

    Hint: make notes as to your modifications and keep them in a safe place if you have to rebuild MAMP PRO; it’ll save you time.

  13. scott says:

    Thank you! If you’re even in NYC, I owe you a beer.

  14. Dave Fuller says:

    There a numerous blogs out there still stuck with loading the ‘ioncube_loader_dar_5.2.so’ extension into MAMP Pro because they cannot get to the loaded php.ini. You’ve just shown them the way.

    Thanks you’ve just answered the only issue I had with MAMP Pro. Maybe it is a viable development server after all?

  15. sanjeev says:

    wow! that was god sent. Cheers !!!

  16. Dale Rodgie says:

    Thanks for the heads up. I searched the MAMP PRO forums and they said to change three PHP.INI files, but that never fixed the problem.

    Interestingly, I changed the memory_limit to 32M but phpinfo() says it 20M. Still it’s enough for what I need.

  17. JPierre says:

    THANK YOU!!! YOU SAVED MY DAY WITH THIS POST…

    This bloody think was driving me BANANAS!

  18. redbirdo says:

    Thank you, thank you, thank you!

    Thought I was losing my mind when I kept changing the php.ini and it had no effect…

  19. Kyle Mac says:

    Thanks this saved me today

  20. Oscar.dR says:

    Thanks for that! I was about to uninstall MAMP!

  21. myFlashStore says:

    Thanks SOOOOOO much, this has been bugging me for WEEKS! You’re the man! (or woman)

Leave a Reply