顯示具有 MAMP 標籤的文章。 顯示所有文章
顯示具有 MAMP 標籤的文章。 顯示所有文章

星期一, 7月 25, 2016

[MAMP] 手動變更php版本

如果想要自行變動php版本的話,可以下載php版本後
放置以下目錄


再修正httpd.conf

sudo vim /Applications/MAMP/conf/apache/httpd.conf


開啟後再修正版本模組即可

#LoadModule php5_module        /Applications/MAMP/bin/php/php5.6.10/modules/libphp5.so

#你想要的版本
LoadModule php5_module        /Applications/MAMP/bin/php/php5.6.24/modules/libphp5.so

[MAMP] Mac的php版本改用MAMP的php版本的方法

直接用MAMP來取代mac原本裝裝php5版本,

請參考下面流程,請注意MAMP_PHP改為你要使用的版本號即可

open terminal, type
touch ~/.bash_profile; open ~/.bash_profile
edit as follows below, save, quite and restart terminal or alternately
source ~/.bash_profile
to execute new PATH without restarting terminal
and in the fashion of the DavidYell's post above, also add the following. You can stack various variables by exporting them followed by a single PATH export which I demonstrated below
export MAMP_PHP=/Applications/MAMP/bin/php/php5.6.10/bin
export MAMP_BINS=/Applications/MAMP/Library/bin
export USERBINS=~/bins
export PATH="$USERBINS:$MAMP_PHP:$MAMP_BINS:$PATH"
http://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path

其他你感興趣的文章

Related Posts with Thumbnails