phpubuntunginxraspberry-piioncube

IonCube not loaded with PHP


I am following the instructions here to install the Filerun app on my Nginx server, running on Ubuntu / Raspberry Pi 4.

I downloaded the aarch64 version of IonCube and created a file /etc/php/7.4/fpm/conf.d/00-ioncube.ini with contents

zend_extension = /usr/lib/php/ioncube/ioncube_loader_lin_7.4.so  

I verified that the referenced so file exists.

I then ran sudo systemctl restart php7.4-fpm and it shows that the service is running.

But when I do php -v I don't see IonCube mentioned:

$ php --version

PHP 7.4.33 (cli) (built: Nov  8 2022 11:40:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

And when I visit the actual site I get an error saying:

Site error: the ionCube PHP Loader needs to be installed.


Solution

  • I had the wrong version of IonCube. You can run php -i | head -5 to see the architecture:

    phpinfo()
    PHP Version => 7.4.33
    
    System => Linux raspberrypi 5.15.76-v7l+ #1597 SMP Fri Nov 4 12:14:58 GMT 2022 armv7l
    Build Date => Nov  8 2022 11:40:3
    

    In my case it's armv7l (I was wrong to think it was aarch64).

    Downloading the correct version from here solved the problem https://www.ioncube.com/loaders.php