Tag: Mojave

Installing libsodium for PHP on macOS Mojave 10.14

While mcrypt installation has been the subject of [developer] fits and [yours truly’s] restarts, mcrypt is in fact going away. libsodium is the new player in town, a point I anticipated long ago being the venerable tech expert that I am just found out being the accountant who unfortunately bears the burden of having used dBase and Paradox in a past life.

That said, the process is relatively similar to mcrypt i.e. you will need brew (and I suggest XCode command line tools, just in case). Instructions for both are readily available via the only hyperlink in the paragraph immediately proceeding this one. Further, you need not bother with PHP source, but you might as well turn off SIP beforehand. Now let’s get started.

(more…)

Plugging mcrypt into PHP on macOS Mojave 10.14

Back by popular demand i.e. someone was struggling with ciphers in PHP and doing so on my dime. This will be quicker than prior implementations as we are going to dispense with building libmcrypt from source, as well as roll 64-bit only.

First, grab/do the following …

1) PHP 7.1.23 source code, which is available here; it is what my machine was running as of late, but you should use php -v to check your version of PHP and then download the PHP source for that version;

2) Xcode 10.2.1, available from the Mac App Store; you will also need the Command Line Tools (macOS 10.14) for Xcode, which you get by selecting “Xcode/Open Developer Tool/More Developer Tools…” from the Xcode menu, then logging into your Apple Developer account; it was at the top of the list as of the morning this post was written;

3) Homebrew (http://brew.sh) which can be installed by typing ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/ install/master/install)” at the command line; I removed Homebrew completely then reinstalled, rather than deal with updates, permissions issues, etc. that might arise after numerous macOS updates/upgrades;

4) Turn off System Integrity Protection (SIP):

  • Click the Apple menu (upper left hand corner of your screen)
  • Select Restart, then hold down the Command-R keys to boot into Recovery Mode
  • Select the Utilities menu and then Terminal
  • In Terminal, type csrutil disable and then hit return; then close Terminal
  • Click the Apple menu and select Restart
  • When you are done installing mcrypt, you can restart SIP by following the above steps while using csrutil enable.
(more…)