ionCube PHP Loader unavailable on PHP 8.0

ionCube PHP Loader is not available when running PHP 8.0, but it does work on PHP 8.1. Learn more in this article.

The ionCube Loader is a PHP extension that decodes and executes encoded files at run-time. It is not available when running PHP 8.0, but it is supported on PHP 8.1. If you are running PHP 8.0 and want to use ionCube, you must change the PHP version to 8.1 (or an earlier version, such as 7.4).

Follow the appropriate procedure below for your hosting package to change the active PHP version.

Shared and reseller hosting accounts

To change the PHP version on a shared or reseller hosting account, use the PHP Selector. To do this, follow these steps:

  1. Log in to cPanel.

    📘

    Note

    If you do not know how to log in to your cPanel account, please see this article.

  2. Open the PHP Selector:

    • If you are using the Jupiter theme, on the Tools page, in the Software section, click Select PHP Version:
      cPanel - Select PHP Version icon

    • If you are using the Paper Lantern theme, in the SOFTWARE section of the cPanel home page, click Select PHP Version:
      cPanel - Select PHP Version icon

  3. cPanel displays the current PHP version. To change the PHP version, in the Current PHP Version list box, select the version that you want to use, and then click Set as current.

    📘

    Note

    Remember that if you want to use ionCube PHP Loader, select a PHP version other than 8.0, such as 8.1 or 7.4.

  4. The new PHP version takes effect immediately.

    👍

    Tip

    To verify the new version is active, you can create a PHP file that runs the phpinfo() function. For more information, please see this article.

Managed VPS and Dedicated servers

On Managed VPS and Dedicated servers, you can change the PHP version for an entire domain or for a specific directory. The following procedures explain how to do this.

Changing the PHP version for an entire domain

To change the PHP version for an entire domain or domains, follow these steps:

  1. Log in to cPanel.

    📘

    Note

    If you do not know how to log in to your cPanel account, please see this article.

  2. Open MultiPHP Manager:

    • If you are using the Jupiter theme, on the Tools page, in the Software section, click MultiPHP Manager:
      cPanel -  Software - MultiPHP Manager icon

    • If you are using the Paper Lantern theme, in the SOFTWARE section of the cPanel home page, click MultiPHP Manager:
      cPanel -  Software - MultiPHP Manager icon

  3. Under System PHP Version, cPanel displays the default PHP version for your server. Any domain that does not have a PHP version explicitly set uses this version.

  4. To change the PHP version, under Set PHP Version per Domain, select the check box next to the domain or domains for which you want to change the PHP version:
    cPanel - MultiPHP Manager - Select domain

  5. In the PHP Version list box, select the PHP version you want to use for the domain or domains, and then click Apply:
    cPanel - MultiPHP Manager - Select version

    📘

    Note

    Remember that if you want to use ionCube PHP Loader, select a PHP version other than 8.0, such as 8.1 or 7.4.

  6. The new PHP version for the domain takes effect immediately.

    👍

    Tip

    To verify the new version is active, you can create a PHP file that runs the phpinfo() function. For more information, please see this article.

Changing the PHP version for a specific directory

You do not have to change the PHP version for an entire domain. Alternatively, you can set different PHP versions for different directories on your site by using .htaccess files. To do this, follow these steps:

  1. Using your preferred text editor, create a file named .htaccess in the directory where you want to set the PHP version.

  2. Copy the following text and then paste it into the .htacces file:

    <FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
        SetHandler application/x-httpd-ea-php81___lsphp
    </FilesMatch>
    

    👍

    Tip

    The SetHandler directive above sets the PHP version to 8.1. If you want to use another version, type that instead. For example, to set the PHP version to 7.4 in the directory, type:

    SetHandler application/x-httpd-ea-php74___lsphp
    
  3. Save your changes to the .htaccess file.

  4. The new PHP version for the directory takes effect immediately.

    👍

    Tip

    To verify the new version is active, you can create a PHP file that runs the phpinfo() function. For more information, please see this article.

More Information

For more information about ionCube, please visit http://www.ioncube.com.

Related Articles