2

I am installing yii 2 on a mac. I have mamp pro (3.0.7.3 latest) when i go to the command line and run.

php init i get a message saying

The mcrypt PHP extension is required by Yii2.

I checked the server using phpinfo() and it shows mcypt enabled. I checked the php.ini and it is listed and the file exists in the referenced directory.

any ideas anyone ??

MB.
  • 723
  • 1
  • 11
  • 28

1 Answers1

2

This probably means that your php CLI (Command Line Interface) does not use the same php.ini than MAMP. You could use something like php -c /path/to/mamp/php.ini to be sure to use the same php.ini.

Or try the following command : php --ini, this will show you configuration file names, e.g. :

Configuration File (php.ini) Path: /path/to/php/conf
Loaded Configuration File: (none)

You could then make a symbolic link :

cd /path/to/php/conf
sudo ln -s /path/to/mamp/php.ini php.ini
soju
  • 25,111
  • 3
  • 68
  • 70
  • Thanks that was the problem... I tried the php -c /path/php.ini init. Now the framework is objecting to module version on mamp being newer so I'll have to figure that one out.. – MB. Dec 20 '14 at 18:13