I always forget the steps, but it's pretty simple:
Steps:
- Download the IonCube Loaders
- Check your PHP version to find which IonCube loader you should use
- Check your PHP configuration for the
extension_dir - Copy the IonCube Loader into the PHP extension directory
- Tell
php.inito load your extension - Restart your web server
$ cd
$ wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
$ tar -zxvf ioncube_loaders_lin_x86-64.tar.gz$ php -vShould output something like this:
augash at p3595792 in ~
› php -v
PHP 5.3.3 (cli) (built: Dec 5 2013 07:09:40)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend TechnologiesSo if you are using PHP 5.3.x then you should be using the ~/ioncube/ioncube_loader_lin_5.3.so IonCube loader.
You'll need to copy the proper IonCube loader (determined from previous step, e.g., ioncube_loader_lin_5.3.so) into your PHP's extension directory, which you can find with the following command:
$ php -i | grep extension_dirWhich should output something like this:
augash at p3595792 in ~
› php -i | grep extension_dir
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modulesAgain, using the IonCube loader and extension_dir values determined from previous steps, you can now copy the loader over (you may need to be root user or have sudo privileges to do this).
$ sudo cp ~/ioncube/ioncube_loader_lin_5.3.so /usr/lib64/php/modulesYou can either put the following code in your php.ini file or if your PHP is configured to dynamically load ini files (typically from /etc/php.d/) then you can create an /etc/php.d/ioncube.ini file and put something similar to this in the file:
$ sudo vi /etc/php.d/ioncube.iniIn my /etc/php.d/ioncube.ini file:
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.3.so
Apache: (Ubuntu/Debian)
$ sudo service apache2 restartApache: (RedHat/CentOS)
$ sudo service httpd restartNginx with PHP-FPM
Note: some PHP-FPM installations will use php5-fpm instead of php-fpm
$ sudo service nginx restart
$ sudo service php-fpm restart