DEV Community

Sam
Sam

Posted on

How to install ionCube Loader with Laravel Valet on MacOS (Intel)

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:

ionCube Loader instructions for MacOS Intel with Laravel Valet

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:

ionCube Loader Blocked

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:

How to enable ionCube loader in MacOS Privacy & Security settings

Afterward, restart Valet again and all should now be working.

ionCube Loader Wizard - Loader Installed Successfully

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"


Enter fullscreen mode Exit fullscreen mode

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)