Error in mcrypt after updating in El Capitan OS

I just updated my OS in El Capitan. I had to make some changes to my apache configurations so that everything worked as before.

Thanks for - http://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-osx-10-11-el-capitan/

One thing that doesn't work for me is the Mcrypt extension. Does anyone know how to update it to make it work?

+1
source share
3 answers

After switching to El Capitan, mcrypt.so was moved from

/ usr / lib / php / extensions / no-debug-non-zts-20121212

to

/ Library / SystemMigration / History / Migration- (UUID) /QuarantineRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so

To be able to copy the moved file back, you must first disable SIP, as described here http://www.howtogeek.com/230424/how-to-disable-system-integrity-protection-on-a-mac- and-why-you-shouldnt

Then copy the moved mcrypt.so file to / usr / lib / php / extensions / no -debug-non-zts-20121212

Final restart of Apache

0
source

If you look at the coolest rails on the planet separately for mcrypt, they suggest disabling SIP. But there is a way around this. Follow the instructions as usual (skipping the SIP part), and after running /usr/bin/phpize you can override the make extensions directory.

First create a new home for php extensions:

 mkdir -p /usr/local/lib/php/extensions 

Then run:

 ./configure make sudo make EXTENSION_DIR='/usr/local/lib/php/extensions' install 

And finally, when you add the extension to your php.ini , the easiest option is to include the full path to the file.

 extension=/usr/local/lib/php/extensions/mcrypt.so 

So far this works for me.

Indirect links:
Mcrypt configuration error after upgrading to El Capitan (Ask Different)
Commentary by John Gardner, who started me on my way

0
source

All Articles