Laravel requires the Mcrypt PHP extension

后端 未结 22 2055
生来不讨喜
生来不讨喜 2020-11-22 07:59

I am trying to use the migrate function in Laravel 4 on OSX. However, I am getting the following error:

Laravel requir         


        
22条回答
  •  粉色の甜心
    2020-11-22 08:23

    Do you have MAMP installed?

    Use which php in the terminal to see which version of PHP you are using.

    If it's not the PHP version from MAMP, you should edit or add .bash_profile in the user's home directory, that is : cd ~

    In .bash_profile, add following line:

    export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH
    

    Edited: First you should use command cd /Applications/MAMP/bin/php to check which PHP version from MAMP you are using and then replace with the PHP version above.

    Then restart the terminal to see which PHP you are using now.

    And it should be working now.

提交回复
热议问题