Fresh Laravel install giving Mcrypt “error”. (OSX)

江枫思渺然 提交于 2020-01-04 18:09:32

问题


I install laravel by running:

laravel new testing

And it responds with:

Application ready! Build something amazing.

Yet when I visit public/index.php, it presents an empty page that says:

Mcrypt PHP extension required.

When I run php -m it does not list Mcrypt.

I tried installing it with composer, by running:

composer create-project laravel/laravel laravel_composer --prefer-dist

And it resulted with the following:

Writing lock file
Generating autoload files
Mcrypt PHP extension required.
Script php artisan clear-compiled handling the post-install-cmd event returned with an error



[RuntimeException]  
Error Output:

There is nothing additional after "Error Output:"


回答1:


Solution by OP.

I resolved the issue by updating to php55 and php55-mcrypt using homebrew.

I had an issue with conflicting php versions post-install, which I resolved by editing the apache2 httpd.conf property LoadModule php5_module. By uncommenting it and changing the default file path to look for local/php5-5.5.11-20140408-141340/libphp5.so.

Mcrypt was no longer an issue and apache was locating the correct php. The last thing I had to do was change the permissions of laravel_project/app/storage using chmod -R o+w storage



来源:https://stackoverflow.com/questions/23176606/fresh-laravel-install-giving-mcrypt-error-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!