PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 14, 2022

[FIXED] Problems running init as part of yii 2 install

 February 14, 2022     mamp, mamp-pro, mcrypt, yii2     No comments   

Issue

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 ??


Solution

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


Answered By - soju
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing