IonCube does not load for WHMCS

Dear Developers!

When we try to install WHMCS 4.5.2 by the included Install Script we get the following error message from the installer.
---
Now installing WHMCS version 4.5.2 ..

System check failed
More information on using this script can be found at http://www.whmcs.com/members/aff.php?aff=4115.

.. installation was only partially complete.
---

Then when open the site we also get the following error message.
---
Site error: the file /home/.../public_html/whmcs/index.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.
---

Please help us solve this issue as we are evaluating WHMCS for 15 days before deciding to implement.

Many thanks and greetings.

Gergo GICZY
Hungary/EU

Status: 
Closed (fixed)

Comments

Howdy -- normally the Install Script would setup the Ioncube loaders for you.

You may want to look in $HOME/logs/error_log for any errors that occurring.

However, what PHP execution mode are you using? It's possible that using mod_php rather than the default FCGI or CGI could cause that, since it uses the system-wide php.ini file rather than the local one for that domain.

You can see the PHP Execution Mode in Server Configuration -> Website Options.

Dear Andrey!

Thank you for spending time on this issue.

Unfortunately we cannot find any specific in 'error_log', just the usual "File does not exist:" messages missing the 'favicon.ico' file.

And we can confirm that
- the PHP execution engine is "FCGId (run as virtual server owner)"
- the '~/etc/php5/php.ini' file includes the reference to the 'ioncube_loader_lin_5.2.so' file
- the '~/etc/ioncube_loader_lin_5.2.so' file exists
- the '~/public_html' directory uses PHP Version 5

So we can find nothing wrong according to PHP but it does not work.

Could you help by some deeper investigation, please.

Many thanks and greetings.

Gergo

Can you create a file named "test.php" in your public_html folder, and put the following in it:

<?php phpinfo(); ?>

And then, let us know the URL we can use to access that test.php script. That will give us some insight into your PHP configuration.

Well, ioncube is definitely not being loaded.

Here are a few things to try:

  1. What is the output of this command: ls -l /home/evol-is/etc/php.ini

  2. And the output of this command: grep ioncube /home/evol-is/etc/php5/php.ini

  3. What is the full path to where WHMCS is being installed?

Thanks!

1. "lrwxrwxrwx 1 evol-is evol-is 12 2010-10-30 01:55 /home/evol-is/etc/php.ini -> php4/php.ini"

2. "zend_extension=/home/evol-is/etc/ioncube_loader_lin_5.2.so"

3. '/home/evol-is/public_html/whmcs'

Many thanks.

Gergo

My suspicion is that this is due to your /home/evol-is/etc/php.ini file pointing to a PHP4 config file.

Are you using PHP4 for this website at all?

If not, I would suggest the following --

  1. Select this Virtual Server from the drop-down list on the top-left of Virtualmin

  2. Go into System Settings -> PHP Versions

  3. Change the default PHP versions on that screen to be "5" -- right now, they're probably set to "4".

After you do that, see if things work correctly for you.

Well, this was our first checkpoint. As a workaround we tried to place the real Version 5 'php.ini' to '~/etc/' but did not work.

No, we do not use PHP4, we use PHP5 everywhere.

The Server Configuration / PHP Versions » Website subdirectory - Default HTML directory points to Version 5.

Otherwise all of our sites has the same configuration regarding the 'php.ini' link and the version configuration setting - even the brand new ones.

Many thanks.

Gergo

ronald's picture
Submitted by ronald on Mon, 10/17/2011 - 17:10 Pro Licensee

per haps for reference
This is what I have in the php.ini with a working WHMCS

zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.2.so
 
 
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so 

What output do you get from these commands:

  1. php -v

  2. file /home/evol-is/etc/ioncube_loader_lin_5.2.so

  3. uname -a

The standalone 'zend_extension' line is there in '~/etc/php5/php.ini'.

But we cannot find the "[Zend]" section's lines, nor the '/usr/local/Zend' directory.

The outputs are:

1. PHP 5.2.6-1+lenny13 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 1 2011 17:03:36) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

2. /home/evol-is/etc/ioncube_loader_lin_5.2.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

3. Linux controller1.multihost2.master.is-v.net 2.6.26-1-amd64 #1 SMP Fri Mar 13 19:34:38 UTC 2009 x86_64 GNU/Linux

Many thanks.

Gergo

Yeah, that all looks normal.

I'm really not sure what's wrong, we haven't run into any problems like the one you're seeing.

To be able to assist, I think I'd need to log into your system and do some troubleshooting.

If that's okay, you can either enable the Remote Support option in the Virtualmin Support module, or you can email your root login details to eric@virtualmin.com.

Thanks!

We're lost too...

Now enabled the Remote Login Privileges.

Many thanks.

Gergo

Okay, it appears that the problem is that although your system is using a 64 bit kernel, it's not actually a 64 bit system... the various binaries on your system are all 32 bit.

When Virtualmin installed the ionCube loader module, it determines which module to install based on the kernel you're using, as typically the kernel matches the installed binaries.

So it installed the 64 bit ionCube loaders -- but that didn't work since technically your system is 32 bit.

For some reason, the kernel architecture and system architecture don't match in your case... and until now, I didn't even realize that was possible :-)

However, I manually installed the 32 bit version of the ionCube loader, and now that seems to be loading properly.

Let us know if that works for you now!

Interesting...

We tried to reinstall the WHMCS by the built-in script but the error messages by the installer and the site are the same.

Then we downloaded the 32 bit IonCube from http://downloads2.ioncube.com:80/loader_downloads/ioncube_loaders_lin_x8... and changed the corresponding '/home/evol-is/etc/ioncube_loader_lin_5.2.so' file but the error message by the site is still the same.

Where to go onward, please?

Many thanks.

Gergo

Hmm, it looks like the installer may be copying the ioncube files each time, which would undue our fixes.

Unfortunately, due to the unusual nature of your setup there -- you may need to perform your WHMCS installation manually, rather than using the Install Script.

I'll talk to Jamie to see if a future version of Virtualmin could handle that situation, but for the short term, your best bet looks like it would be to perform a manual install.

Also, after putting a 32 bit copy of the ionCube loader in /home/evol-is/etc/ioncube_loader_lin_5.2.so, you would need to restart Apache. You can do that with "/etc/init.d/apache2 reload".

Thank you for your attention.

This way we go on. Keep up the good work in the future.

Many thanks and greetings.

Gergo