donglun1020 2016-04-29 08:33
浏览 90
已采纳

使用PHP和PDO进行Laravel和Brew安装

I have just moved from linux to mac and am having some issues installing PHP with the right drivers for Laravel.

I ran brew install homebrew/php/php56-mysqlnd_ms

but now I keep getting this error

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php56-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-mcrypt/mcrypt.so' - dlopen(/usr/local/opt/php56-mcrypt/mcrypt.so, 9): image not found in Unknown on line 0
phpinfo()

PHP Version => 5.6.21

Does anybody know how to fix this error? I am at a loss

  • 写回答

2条回答 默认 最新

  • dongzhashou0116 2016-04-29 08:40
    关注

    You are missing mcrypt . You can try ,

    brew install php54-mcrypt --without-homebrew-php

    And then , in /etc/php.ini add,

    extension="/usr/local/Cellar/php54-mcrypt/5.4.24/mcrypt.so"

    I hope this will help , please let us know

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

报告相同问题?