关于 macos:如何在 MAMP 4.1 上更改 PHP 版本

How to change PHP version on MAMP 4.1

我在我的 Mac 上下载了 MAMP 4.1;默认情况下,我可以使用的唯一 PHP 版本是 7.0.15 和 7.1.1

如何使用 PHP 5.6?

我在这里尝试了解决方案,它说我应该将我不想使用的版本重命名为其他东西。但它对我不起作用。


正如@Scott 在您的问题下的评论中提到的那样:

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. a€” Scott Eisenberg

链接中的答案是:

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.

在我的情况下(和你的情况类似),我将名为 php7.1.1 的文件夹重命名为 _php7.1.1,现在 MAMP 在首选项窗格中显示 5.6.307.0.15


这就是我的”php”文件夹的样子

Current

创建了另一个文件夹”php-versions”并移动了所有版本,并在”php”文件夹中只保留了我想要的两个版本。并重新启动 Mamp,转到版本 ‘5.6.31’

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/php/268483.html

(0)
上一篇 2022年6月20日 09:55
下一篇 2022年6月20日 09:55

相关推荐

发表回复

登录后才能评论