Page 1 of 1

Ubuntu Ioncube Loaders Guide

Posted: Sun Mar 01, 2015 8:42 pm
by KeiroD
So, I recently set up a server with VestaCP and set it up for my hosting company.

Now, normally, for apps that use ioncube loaders... you'd need to do some server work to get ioncube loaders working for WHMCS, Blesta, etc.

To do that on Ubuntu, you need to do the following:

Download Ioncube Loaders for your system. If you want to do web-based, I'd use the PHP script version in a zip so you can upload it, view it and follow its guide. It will ask you to copy the .so for your respective PHP version.

To find out what your version of PHP is, do the following:

Code: Select all

php --version
You should get something like this:

Code: Select all

root@eidolos:/etc/php5/apache2# php --version
PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:17:11)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
Now, the stumbling block in actually getting the loaders to work when restarting apache2 and it's still complaining it's not there despite copying the .so to where it needs to be and uploading the 20-ioncube.ini to the server.

If you checked /var/log/apache2/error_log and saw that it's complaining that the extension needs to be at the top of php.ini... you're wondering "Wait, didn't I just do that with the 20-ioncube.ini file?!?!" Yes, you did, but for some reason it insists it needs to be at the top. So, to fix that, we do the following steps:

Code: Select all

cd /etc/php5/apache2
Now we edit the php.ini file accordingly.

Code: Select all

nano php.ini
Right beneath [PHP] throw this there at the top:

Code: Select all

zend_extension = /usr/lib/php5/20121212/ioncube_loader_lin_5.5.so
Your php.ini should now look like this:

Code: Select all

[PHP]
zend_extension = /usr/lib/php5/20121212/ioncube_loader_lin_5.5.so

;;;;;;;;;;;;;;;;;;;
; About php.ini   ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.

; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
; 1. SAPI module specific location.
; 2. The PHPRC environment variable. (As of PHP 5.2.0)
; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
; 4. Current working directory (except CLI)
; 5. The web server's directory (for SAPI modules), or directory of PHP
; (otherwise in Windows)
; 6. The directory from the --with-config-file-path compile time option, or the
; Windows directory (C:\windows or C:\winnt)
; See the PHP docs for more specific information.
; http://php.net/configuration.file
Finally: Restart apache2!

Code: Select all

service apache2 restart
Check your site and the loader wizard and make sure it actually works!

Re: Ubuntu Ioncube Loaders Guide

Posted: Wed Mar 18, 2015 1:58 pm
by skurudo
Thanks, nice guide.

But record about ioncube, we can add in /etc/php5/conf.d/ioncube.ini too.

Re: Ubuntu Ioncube Loaders Guide

Posted: Fri Mar 20, 2015 11:21 pm
by KeiroD
skurudo wrote:Thanks, nice guide.

But record about ioncube, we can add in /etc/php5/conf.d/ioncube.ini too.
That needs to be included by default, then. Because VestaCP doesn't come with ioncube loaders enabled by default. Or with the ioncube loaders even in place, for that matter.

Re: Ubuntu Ioncube Loaders Guide

Posted: Sat Mar 21, 2015 4:30 am
by skurudo
Ioncube loader it's extension rarer then zend, not often need.

Re: Ubuntu Ioncube Loaders Guide

Posted: Mon Mar 23, 2015 10:16 pm
by KeiroD
skurudo wrote:Ioncube loader it's extension rarer then zend, not often need.
You should include an option in the web interface whether or not to enable/disable it, then. That way users have the choice of loading the ioncube loaders or not, just as cPanel does.

Re: Ubuntu Ioncube Loaders Guide

Posted: Tue Mar 24, 2015 4:49 am
by skurudo
KeiroD wrote:You should include an option in the web interface whether or not to enable/disable it, then. That way users have the choice of loading the ioncube loaders or not, just as cPanel does.
Please add this idea to https://bugs.vestacp.com/

Re: Ubuntu Ioncube Loaders Guide

Posted: Thu Mar 26, 2015 9:03 pm
by KeiroD
skurudo wrote:
KeiroD wrote:You should include an option in the web interface whether or not to enable/disable it, then. That way users have the choice of loading the ioncube loaders or not, just as cPanel does.
Please add this idea to https://bugs.vestacp.com/
Done. Now it's up to you guys to add it. :p