Upgrading or Removing aMiSTACX Modules for PHP 8.1

aMiSTACX performance modules for Magento 2 and PHP 8.1

Important! Please take a FULL backup AMI image before you attempt to follow these instructions. Do NOT attempt on a live production server. You can take a full image from the AWS console and or A51. If you use RDS, also take a snaphot.

If you want or need aMiSTACX to handle this upgrade or removal of our modules, please contact our human engineers.

Background : Due to a vendor that provides php loaders for PHP not currently supporting PHP 8.x and Magento [at the time of this post], after several years of usage, and a support case that remained open for more than six months, we were forced to change vendors. [All of us are not happy about this experience.]

We attempted to notify customers well in advance [starting in August 2022] that our modules would not be compatible for any upgrades to PHP 8.1 and/or Magento 2.4.5.

As of February, 2023, we have switched to a new vendor, and are rolling out compatible stacks with new loaders and PHP 8.1 support for Magento. [This issue impacts stacks for Magento Open-Source, not WordPress CMS.]

Legacy customers are presented with a two choices for an upgrade path to PHP 8.1 and Magento:

1. Removal : If you are not using aMiSTACX modules, then the easiest path is to remove them all, and then recompile.

e.g. sudo composer remove amistacx/moduleupdater

sudo composer remove amistacx/ramjet etc..

Then make use of our compile script found in /magento/   # If you don’t have a compile script, please contact support.

sudo ./amistacx.sh

2. Upgrade : The upgrade path has a lot more complication. First, you will need to prep the new loaders for PHP 8.1 and PHP 7.4:

edit /etc/php/8.1 [Folder/File: Apache File php.ini, CLI php.ini, and FPM php.ini]

edit /etc/php/7.4 [Folder/File: Apache File php.ini, CLI php.ini, and FPM php.ini]

Add to end of the php.ini files respectively:

For 8.1


For 7.4


Tip: Comment-out the php ionCube loader line only after you are 100% finished. No reason to comment them out at this stage. You will know they are still loading, because they will print their version when you type: php -v at CLI.

Then proceed to download the loader for PHP 8.1 Linux v14.0+

Add the file loader named ixed.8.1.lin to this PHP directory:


Add the file loader named ixed.7.4.lin to this PHP directory:


Reboot the system:

sudo reboot

Identify and Remove

Step 1. In this directory, you will find the names of the aMiSTACX modules you will need to remove.


E.g. sudo composer remove amistacx/ramjet

After removal, please run the compile script:

sudo ./amistacx.sh

Step 2. Change all the aMiSTACX repo names in /magento/composer.json

New Repos:

For example,



Step 3.

Re-add clean modules encoded with SG:

e.g. sudo composer require amistacx/moduleupdater dev-master -W

Important! You will first need to install aMiSTACX ModuleUpdater, and contact support for new repo read keys.

After ModuleUpdater is installed, it will handle all subsequent repo access.

Step 4.  Re-compile

sudo ./amistacx.sh

Step 5. Switch to PHP 8.1

You can now switch from PHP 7.4 to 8.1 using our helper script in /utility/ or you can reference your stack guide. [If you have a stack older than six months, please reference your stack guide.] If you are using NGINX, you will also need to change the PHP FPM sock references. [There are a total of four references between the two vhost files.]

Clean Up

You can now comment out all IC ref lines in PHP 8.1 and 7.4:


;zend_extension = "/usr/lib/php/20210902/ioncube_loader_lin_8.1.so"

;zend_extension = "/usr/lib/php/20190902/ioncube_loader_lin_7.4.so"

Delete the ionCube .so files in

/usr/lib/php/20210902/ & /usr/lib/php/20190902

Named: ioncube_loader_lin_8.1.so & ioncube_loader_lin_7.4.so

and finally remove files [00-ioncube.ini] from /etc/php/8.1/fpm/conf.d & /etc/php/7.4/fpm/conf.d

then sudo reboot

IC will now be removed from your system, and SG will be the new loaders.


Contact human help should you need assistance. We will gladly help you 100% with this process and we have tested automated scripts to help make it painless.