2

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:"

7
  • It probably requires the mcrypt library to be installed ;) Please provide more info, which PHP executable are you using? The one which comes with OS X, or maybe MAMP or something else? Commented Apr 19, 2014 at 23:12
  • Recompile PHP with mcrypt. Commented Apr 19, 2014 at 23:13
  • @RonniEgeriis I am using the default install location of php. '/usr/bin/php' Commented Apr 19, 2014 at 23:16
  • 1
    I would recommend using MAMP and point your default php symlink to the php binary found in your MAMP installation. This is by far the easiest solution. You can also call the php binary directly, e.g. /Applications/MAMP/bin/php/php5.4.10/bin/php script.php Commented Apr 22, 2014 at 13:07
  • 1
    @ChinDave You should post an answer and accept it so that this question stops appearing un unanswered lists. Commented Nov 25, 2014 at 12:27

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.