PDA

View Full Version : How i updated IonCube Loader on cPanel CentOS Linux server



Fli
02-15-2017, 10:21 PM
Some php script complained that i need to update (or upgrade?) IonCube Loader. I had version 5.3 (cat /usr/local/lib/php.ini|grep IonCube), so i tried to download version 7, but script complained it needs 5.3, so i assumed there must be some updated v. 5.3..

So how i updated my IonCube Loader on the CentOS server with cPanel?

1. Login server via SSH
2. Execute following command to see where is the IonCube loader file: cat /usr/local/lib/php.ini|grep IonCube
If php.ini not found, try command: whereis php.ini
In my case i see this line after grepping php.ini:
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
so i went to that directory: cd /usr/local/IonCube/
3. Go to IonCube site and find appropriate .tar.gz archive: http://www.ioncube.com/loaders.php
In my case it is Linux (64 bits), so i executed this command to download archive: wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
4. Extract downloaded archive: tar -xzf ioncube_loaders_lin_x86-64.tar.gz
5. backup current ioncube file, in my case: cp -p ioncube_loader_lin_5.3.so ioncube_loader_lin_5.3.so_backup
6. copy and overwrite current file by new file. In my case: cp ioncube/ioncube_loader_lin_5.3.so ioncube_loader_lin_5.3.so
7. i chmod file: chmod 755 ioncube_loader_lin_5.3.so
8. done

"service httpd restart" may not be needed. In case of upgrade to another version i assume one just need to add .so file into /usr/local/IonCube/ and change path in /usr/local/lib/php.ini from example:
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
to:
zend_extension = "/usr/local/IonCube/ioncube_loader_lin_7.0.so"
and possibly restart httpd