PHP Fatal error with Ioncube loader

Hosting Servers with Multiple PHP Versions

Offering various PHP versions have been come popular with almost all hosting providers. For example on ResellerClub Hosting servers, you can place a file called "usealtphp" into the /home/user/ dir and activate support for the latest PHP version (php5.3 or php5.4).

However, not all Hosting Providers are offering these "PHP switching" features correctly. If not correctly setup by the Hosting Provider, the PHP CLI (command line interface) used to execute php scripts with cronjobs still use the default installed PHP version.


The Problem

If your Hosting Server has default php 5.2 and you have switched to php 5.3, then you can use ioncube encoded scripts for php 5.3 without any problem. However, for cronjob executed scripts, this will only work correctly if the CLI also has been configured to use the newer php version.


How to fix if CLI use default php

If your hosting server is not correctly setup by the hosting provider, then you need to change the path for all WHMCS related cronjob tasks. The following steps will show you how to get the correct path to use with cronjobs:


  1. In your WHMCS goto Utilities -> System -> PHP Info
  2. Locate the "Configuration File Path":

    phpinfo

  3. Take note of the path (see screenshot above). For example, if the path is something like "/usr/local/altphp/lib", then copy/paste the complete string into a text file and change /lib with /bin/php. Example: /usr/local/altphp/bin/php.
  4. Edit now all WHMCS related cronjobs and change "php -q" with "/usr/local/altphp/bin/php -q"

Your cronjob tasks will now use the correct PHP version.

Note:
You need to change the same if you pipe support tickets:/usr/local/altphp/bin/php -q /home/username/public_html/whmcs/pipe/pipe.php


  • 48 Users Found This Useful
Was this answer helpful?

Related Articles

I whitelist my Server IP in my Reseller Account but the FREE tools still does not work

Whitelisting the IP which resolves to your whmcs domain is not enough if the Hosting Server have...

Blank Admin Screen or Fatal error: Cannot redeclare getvalidlanguages()

You got this error message or a blank screen because you have not correctly installed or updated...

Access Denied: You are not authorized to perform this action

You got this error message because you have not registered all your IPs for API Access. You need...

Detected attempt to include init.php for a second time. Unable to continue

You got this error messages because you have not correctly installed or updated the FREE Tools...

Client and Admin Area Language Files

Default Languages All Modules includes by default English and Spanish Language files. Language...