Sunday, May 5, 2013

How to install IonCube on your server and script

IonCube Loaders is an encryption/decryption utility for Websites created by php language. IonCube Loaders is one of the requirements for running a lot of php scripts.

If you use Cpanel & WHM follow this steps:
1) Using EasyApache via WHM >> EasyApache, IonCube Loaders can be selected under the Exhaustive Options List prior to compiling.
2) As the user `root` via SSH, you can run the below command to install IonCube Loaders without having to recompile Apache:

/scripts/phpextensionmgr install IonCubeLoader


If you don't use Control panels follow this steps:


  1. Begin by downloading the latest loaders to your computer from http://www.ioncube.com/loaders.php
  2. Extract the contents of the archived file on your local PC to a folder of your choice.
  3. Upload the folder IONCUBE via FTP to your domain webspace
  4. Now establish an SSH connection with server using a suitable client (e.g. Putty for PC's or Terminal on Mac). This is usually done using the command: SSH rootusername@yourserver.com (you will then be asked for your password).
  5. You will need to browse to the public folder where you uploaded the IONCUBE directory (search internet for change and view directory commands in Unix).
  6. Move the ioncube folder to a permanent location by entering: mv ioncube /usr/local
  7. Next, you need to locate the php.ini file, to do this enter: locate php.ini - You should find it is in /usr/local/lib/php.ini. 
  8. Now that you know the location of php.ini you need to edit it. pico /usr/local/lib/php.ini
  9. Now find where other zend extentions are in the file: ctrl + w: zend_extension
  10. Paste in your new line for ioncube loader: zend_extension = /usr/local/ioncube/ioncube_loader_lin_x.so (Replace x with your version of PHP eg. 4.4)
  11. Save the changes: ctrl + X then Y and enter
  12. Restart the web server to take effect: /etc/init.d/httpd restart
  13. That's it! Ioncube should now be installed & working on your server. 


To verify the installation was successful, check the PHP Info output for your server and you should see a new section which reads:

Additional Modules
Module Name ionCube Loader
Disqus Comments