Installing the ionCube loader on a Litespeed web server is easy. You will typically be required to install ioncube when you are running software that a company is attempting to protect. Sometimes the company will protect all of the code and other times the company might only protect some of the PHP code. The easiest way to install the ionCube loader is to modify the php.ini file located in the /etc/ directory by default.
Install ionCube Loader on Litespeed Web Server:
- Download ionCube:First download the ionCube package for your distribution from here.
- Unpack ionCube:Use the syntax below to unpackage the ionCube package of files. I suggest unpacking this file to /usre/local which will create /usr/local/ioncube.
- tar -zxvf ioncube_loaders_lin_x86-64.tar.gz
- Run ionCube Loader Helper:Run the ionCube loader helper by first changing the directory into the newly created ioncube directory and then by using php to run the ioncube-loader-helper.php file as shown below.
- php ioncube-loader-helper.php
Once you run the above command you will see a screen where you need to select an option. Select option 1 to verify the ionCube file that needs to be loaded via the php.ini file. After option 1 is selected the screen will display your PHP version and the ioncube file that needs to be loaded into the php.ini file.
- ionCube Loader Install Assistant
- --------------------------------Analysis of your system configuration shows:+----------------------------------------------+
- | PHP Version | 5.2.10 |
- | Operating System | Linux |
- | Threaded PHP | No |
- | php.ini file | /etc/php.ini |
- | Required Loader | ioncube_loader_lin_5.2.so |
- +----------------------------------------------+To install the Loader in your php.ini file, edit or create the file/etc/php.iniand add the following line before any other zend_extension lines:
- zend_extension = /
- /ioncube_loader_lin_5.2.so
- where /
- / is where you've installed the loader, e.g. /usr/local/ioncube/
- If there are no zend_extension lines already, you can put the
- line at any point in the file.
- Finally, stop and restart your web server software for the changes to
- take effect.
- Installing the Loader for run-time loading
- ------------------------------------------
- To install for runtime loading, create a directory called ioncube
- at or above the top level of your encoded files, and ensure that the directory
- contains the ioncube_loader_lin_5.1.so loader. If run-time install of
- the Loader is possible on your system then encoded files should automatically
- install the loader when needed.
- >> Please choose an option followed by Return, or 0 to exit this script.
- 0. Exit this script
- 1. php.ini installation instructions
- 2. Run-time loading installation instructions
- >>
- Modify php.ini File:Now edit the php.ini file with your favorite text editor. Add the below line to php.ini.
- zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.2.so
Make sure to change the .so file based on the results from you running the ioncube-loader-helper.php file. Note that Litespeed might be using a php.ini in a different file such as /var/lsws/php.ini or /var/lsws/lsphp5/lib/php.ini.
- Restart Web Server:For the changes to be loaded you need to restart the web server which in the case of Litespeed can be done using the syntax below.
- /etc/init.d/lsws restart
If the web server starts without issue then ioncube has more than likely loaded properly. If the web server has an issue starting simply comment out the zend_extension line you added and see if the web server will start without issue.
Here is a renect , although they did not cover my preferred IDE, Visual Studio with the VS.PHP add-in (you don’t get a feature equivalent to Intellisense, you get the real thing!).
Hello Christian,
Not sure exactly what you mean above but thanks for taking the time to leave feedback.
Thanks.
alex