1

I've spent the better part of a day researching this. Yesterday, I updated my Mac laptop to High Sierra. That updated the Server app, which runs my dev environment. The environment is fine except that I can't get mcrypt installed. Mac HS comes with PHP 5.6.30 and I've gone through these steps (https://michaelgracie.com/2016/09/plugging-mcrypt-into-php-on-macos-sierra-10-12/) multiple times. I get to the step where I run

MACOSX_DEPLOYMENT_TARGET=10.13 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --with-php-config=/usr/bin/php-config

But it returns:

-bash: ./configure: No such file or directory

Any help would be extremely appreciated.

Paul T.
  • 4,703
  • 11
  • 25
  • 29
Jeff T
  • 21
  • 3
  • 2
    It is best not to use PHP mcrypt, it is abandonware, has not been updated in years and does not support standard PKCS#7 (née PKCS#5) padding, only non-standard null padding that can't even be used with binary data. mcrypt has many outstanding [bugs](https://sourceforge.net/p/mcrypt/bugs/) dating back to 2003. The mcrypt-extension is deprecated will be removed in PHP 7.2. Instead consider using [defuse](https://github.com/defuse/php-encryption) or [RNCryptor](https://github.com/RNCryptor), they provide a complete solution and are being maintained and is correct. – zaph Nov 09 '17 at 00:02
  • That's great advice - thanks! We'll look into moving to those 2 options asap. In the meantime, though, I still need to get my local dev env working so I can work on the current codebase. So again, any help in getting this specific issue resolved would be appreciated. – Jeff T Nov 09 '17 at 12:48

1 Answers1

1

I have the same problem as you, as i had updated to high Sierra yesterday and screw my dev environment. I finally found out High Sierra comes already with Php71 so the one i already had install was been override, so what i did was this:

for i in $(brew list | grep php); do brew uninstall $i; done

it got my php working now all i did was install

brew install php71-mcrypt php71-imagick

boom worked like a charm for me, hope it helps you or anyone else

All this was from the terminal

also this link may help you as well

https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions

Kristiono Setyadi
  • 5,635
  • 1
  • 19
  • 29
  • I tried this solution, but nothing changed. It's very strange. Mcrypt *seems* to be installed, but it doesn't appear in phpinfo. Any ideas? – Jeff T Nov 11 '17 at 19:20
  • try this solution https://stackoverflow.com/questions/14357107/installing-mcrypt-on-osx-10-8-2-php-5-3-15-with-homebrew – Gustavo A Garcia Nov 13 '17 at 14:31
  • I was really hoping... but no. It's still not allowing me to install mcrypt. Actually, I shouldn't say it that way. It *seems* like it's being installed, but it's not working. phpinfo doesn't show any setting for mcrypt. – Jeff T Nov 14 '17 at 22:49
  • Try adding the path to the mcrypt to your php.ini I add it mine at the end of the file this is how it looks like . extension=/usr/local/Cellar/php71-mcrypt/7.1.11_17/mcrypt.so – Gustavo A Garcia Nov 15 '17 at 14:18