Laravel requires the Mcrypt PHP extension

后端 未结 22 2053
生来不讨喜
生来不讨喜 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:44

    My OS is Yosemite.

    I resolve this issue, by finding configuration paths:

    php --ini
    

    Example output:

    Configuration File (php.ini) Path: /usr/local/etc/php/5.5
    Loaded Configuration File:         /usr/local/etc/php/5.5/php.ini
    Scan for additional .ini files in: /usr/local/etc/php/5.5/conf.d
    Additional .ini files parsed:      (none)
    

    Next steps:

    1. Rename or Delete php55 ini file
    2. Create symlink
    3. Restart Apache server

    Commands:

    mv /usr/local/etc/php/5.5/php.ini /usr/local/etc/php/5.5/php.ini.default
    ln -s /etc/php.ini /usr/local/etc/php/5.5/php.ini
    sudo apachectl restart
    

    Then you can check your php modules via:

    php -m
    

提交回复
热议问题