问题
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