Plugging mcrypt into PHP on macOS High Sierra 10.13: A Requiem

Since Apple’s desktop operating system was called OS X Leopard, I’ve been concocting little ditties on how to plug mcrypt functionality into PHP without complete recompilation and/or using a black box MAMP offering. The previous stop on that [eight year?] journey was with macOS Sierra. And it was/is the end of the line.

Queue list of excuses …

  • I don’t use PHPMyAdmin or Magento eCommerce (both major targets as PHP + mcrypt needs go)
  • I’ve been leaning on Linux VMs for relevant development work (trashing environments and starting over less often than ever)
  • I’ve taken a liking to Python, as it covers everything from number tumbling and data crunching to stupid little utilities for replacing website photos (dropping Anaconda in is a breeze)
  • And not really last but certainly not least, Apple’s latest release, High Sierra 10.13, came complete with a security-related flaw so ludicrous that I probably won’t upgrade until at least iteration two or three. It’s a trust thing.

For those who have already gained elevation in the States’ westernmost major range, all is not lost. If you run through the last set of instructions and replace any code that says “10.12” with “10.13” – along with identifying the proper XCode and PHP versions at the start – you should be ok.

Meanwhile, thanks for the good times.

MG signing off (because that’s all folks)

UPDATE 11/28/17: Like I said, lack of trust.


Sanjib says:

Hi Michael, thank you for the series. It was difficult to get mcrypt working back in those days on Mac and that’s how I discovered your site. As the series comes to an end, I would recommend also for the progeny two useful things that I have found beneficial:
1. It’s trivial to get mcrypt via homebrew (actually I have my whole dev environment on homebrew since the last 2 years)
2. Docker is showing a lot of promise and I think that would be a very interesting alternative (as you are already working with VMs)
Good luck with all the new stuff in the pipeline 🙂

Spot on across the board, with particular emphasis on brew. I have checked out docker; right now I just have too big an investment in VMWare and VBox to transition. Best wishes to you too.

Eric English says:

I’m a fly fisherman and emergency physician who uses Apple products and when my apples rot I buy a new one. My programming needs/high end tech is negligible . I’m an end user at work. I have limited IT needs for my personal professional development and communication. For the most part I enjoy your posts when you hang up the mouse and go fishing. I do admire your experience and professionalism. May I suggest an occasional post to the end user how to optimize end user hardware longetivity and security. My last iMac running Sierra for four years went blank and a puff of ismoke blew out the vent in the back and will no longer boot. The iGenius team said that was very bad!

EDITED: Never too late to learn to code.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.