Download the macOS (64 bits) ZIP file from the Production Loaders section of https://www.ioncube.com/loaders.php.
Unzip the archive and move it to the parked sites folder of your computer (mine would be ~/valet/ioncube
).
Now open http://ioncube.test/loader-wizard.php in your browser and follow steps 1 to 3 of the local installation instructions. The specifics will vary depending on your machine, but here's an example:
You can open the paths in Finder with cd /usr/local/lib/php/pecl/20220829 && open .
for easy dragging and dropping of the loader files (the loaders are the files that have the ".so" extension).
Restart valet (valet restart
) and follow the "click here to test the loader" link to verify your installation.
Now, depending on your Mac's security policy, you may see an alert to say that the OS has blocked the loader:
Go to your System Settings, find Privacy & Security, scroll to the Security section and you should see the ionCube loaders in the list with an option to allow them to be loaded:
Afterward, restart Valet again and all should now be working.
PS: If any further security prompts pop up, choose the "Open" option.
PPS:
WHMCS (or perhaps the ionCube loader) does not work well with the latest PHP 8 as of the time of writing. I had better luck with PHP 7, which can be installed with brew install php@7.4
. You may also want to take note of your current PHP version (which php
) before installing the older one.
My aliases for switching between Valet with PHP 7 & Valet with PHP 8 are:
alias php7="brew unlink php@8.2 && brew link php@7.4"
alias valet7="php7 && valet use php@7.4 --force"
alias php8="brew unlink php@7.4 && brew link php@8.2"
alias valet8="php8 && valet use php@8.2 --force"
If you run into any issues, please look to the many community guides on running multiple versions of PHP locally with Homebrew.
Top comments (0)