IonCube on 32-bit systems
This section is for PHP installed on a 32-bit system (for example: spinning up LAMP on Ubuntu 12.04 from Applications).
If you don’t have a LAMP stack on your droplet, you can spin up a LAMP stack from our Applications:
First, you will need to download and extract the IonCube Loader PHP modules.
1 2 |
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz tar xvfz ioncube_loaders_lin_x86.tar.gz |
Then, you will have to copy the appropriate module to the PHP modules folder. To find that folder’s path, run the following command
1 |
php -i | grep extension_dir |
You will get the following output:
1 |
extension_dir => /usr/lib/php5/20090626+lfs => /usr/lib/php5/20090626+lfs |
Now you should copy over the module to your PHP modules folder:
1 2 |
PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") sudo cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" /usr/lib/php5/20090626+lfs/ |
You would then have to restart Apache2 or php5-fpm (if you’re using nginx) for the module to be loaded:
1 2 |
service apache2 restart service php5-fpm restart |
To ensure that the module was correctly installed, create a file called test.php
in /var/www
with the following content:
1 2 |
<?php echo var_export(extension_loaded('ionCube Loader') ,true); |
Once you have done that, navigate to http://your-droplets-ip-address/test.php
. It should output “true”.
IonCube on 64-bit systems
If you have installed your own LAMP stack on a 64-bit Linux, you would need to download a 64 bit package:
1 2 |
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar xvfz ioncube_loaders_lin_x86-64.tar.gz |
You should proceed with same steps as outlined above.
And you are all done!
Leave a Reply