0

I am getting started with using laravel on Mac and am using MAMP. I am using the `artisan' command with laravel in php.

php artisan migrate:make create_users_table --table=users --create 

But it is giving me this error

php artisan migrate:make create_users_table --table=users --create PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so, 9): image not found in Unknown on line 0 Laravel requires the Mcrypt PHP extension. 

I have installed the mcrypt extension for PHP.

brew install php53-mcrypt 

This gives me a message saying that it is already installed: php53-mcrypt-5.3.26 already installed

3
  • How did you install it, what OS? Commented Sep 20, 2013 at 6:51
  • Im using mac osx and installed it using brew install php53-mcrypt Commented Sep 20, 2013 at 6:53
  • Are you using MAMP or similar? Maybe you have 2 different versions of PHP. Commented Sep 20, 2013 at 6:53

1 Answer 1

3

PHP being different when run in the command line versus through your web server turns out to be a pretty common issue (note that those are three separate links with possible solutions :D)

The key point is to:

  1. make sure the correct PHP binary (the one used by MAMP) is in your PATH
  2. (less likely) to check to see if your CLI-run php.ini and loaded extensions is different from your web-server (apache)-run PHP (They can be potentially different).

Finally, please consider saving your time and some stress by using Vagrant or another VM provider, which gives you the ability to run a "real" web server on your computer without mucking up your Mac OS install!

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

1 Comment

Going along with your point #1, php --ri bcrypt should let you know if it's installed.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.