As per other threads, apologies for the late response. Our PHP build includes the
GD extension as you probably saw, but I wonder if we should include
Imagick also... both are pretty commonly required I would imagine. It's a difficult line to draw, as there are probably 10–20 extensions with relatively common usage.
Regardless, so long as your Mac is Intel (or you have access to one)*, you should indeed be able to install it locally. I would recommend using Homebrew, and since we use (a customised version of)
shivammathur/php when compiling the Indigo PHPs, the process should be relatively easy.
The following is for PHP 7.4; change this where you see it below to suit the version you need. Again, for now this will have to be run on an Intel Mac.
a) tell your Homebrew install about Shivammathur's PHP repositories.
brew tap shivammathur/php
brew tap shivammathur/extensions
b) install Shivammathur's PHP 7.4 into your Homebrew and tell your Mac to use it by default on the command line. We use
reinstall so you can cleanly run this again if needed; it works fine the first time as well.
brew reinstall email@example.com
brew link --overwrite --force firstname.lastname@example.org
c) install imagick. Any extension listed here should work in a similar fashion.
brew reinstall email@example.com
Near the end of the resulting output you'll find a line which tells you where the
ini file was created eg
* /usr/local/homebrew/etc/php/7.4/conf.d/imagick.ini was created,"
d) tell Indigo's PHP about the new extension. You have a couple of options here:
- you can copy the
imagick.so inside your stack file, so that it will be distributed to your team; if you're sharing your stackfile this is a good option
- otherwise point PHP at the original location of the
To do this, copy the
imagick.ini file into your stack definition file (bundle). The path will be something like
My Stack.indigostack/php_SOMETHING/etc/conf.d/imagick.ini. You can rename the ini file if you wish.
Indigo will see this change and offer to restart the stack. Don't restart it just yet.
Inside this copy of the
imagick.ini, adjust the path to your
imagick.so if necessary.
Tell Indigo to restart the stack.
*) for now we are distributing x86 binaries inside Indigo. Apple Silicon Macs run these binaries inside Rosetta with incredible performance, and it saves us either a) maintaining an entirely separate release for ARM, or b) bundling binaries with both architectures inside the app (thus doubling its size). Obviously we intend to address this when the time is right.
The implication for PHP extensions is that you need the x86 extension, even on an ARM Mac, meaning you need to install the extension on an Intel Mac and copy it over.