douchen1988 2017-03-31 01:28
浏览 265
已采纳

如何在MAMP 4.1上更改PHP版本

I downloaded MAMP 4.1 on my Mac; by default, the only PHP versions I can use are 7.0.15 and 7.1.1

How can I use PHP 5.6?

I tried the solution here Which says I should rename the versions I don't want to use to something else. But it didn't work for me.

screenshot of MAMP preferences

  • 写回答

3条回答 默认 最新

  • doushenxu7294 2017-06-06 00:03
    关注

    As mentioned by @Scott in the comments under your question:

    Your here is the right link. Use the bottom answer to rename the bin/php directory. The MAMP preference pane will show the 2 latest versions in the php directory. – Scott Eisenberg

    And the answer in that links is:

    First stop the Server if its running. Go to "/Applications/MAMP/bin/", rename the PHP Version you don't need (MAMP is only allowed to use 2 PHP Versions), e.g. "_php5.2.17". Now MAMP will use the php versions that are left. Go to the MAMP Manager and then settings, then switch to the php version you need.

    In my case (and similarly yours), I renamed the folder named php7.1.1 to _php7.1.1 and now MAMP shows me 5.6.30 and 7.0.15 in the preferences pane.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部