A
A
Anton2014-10-18 22:09:29
PHP
Anton, 2014-10-18 22:09:29

What's wrong with the mcrypt extension?

When I started learning Yii2, I came across something like this:

The mcrypt PHP extension is required by Yii2

Well, everything was clear and I installed this extension. Everything worked.
After upgrading to OS X 10.10, when running the same ./init command, the same error pops up again, but with a few new lines:
./init
PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
The mcrypt PHP extension is required by Yii2

And then I remembered that I had to install Apache again and, therefore, carried out the mcrypt installation procedure (exactly the same as the first time), but this did not work.
What could be the problem? phpinfo() says that mcrypt is enabled:
if8yvs.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zelenin, 2014-10-19
@zelenin

init uses cli and phpinfo shows cgi. In different php.ini mcrypt is connected and not connected

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question