Search code examples
phphost

PHP version in HostGator


I have one problem with my project, when try to upload a new version in my host (HostGator).

This is the error:

PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20131226
PHP compiled with module API=20100525
These options need to match

I change in cPanel the version of PHP 5.4 to 5.6, but when I check the version of PHP in server from connection with putty, I receive the follow message:

PHP 5.4.45 (cli) (built: Apr 17 2017 15:59:08)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.4, Copyright (c) 2002-2018, by ionCube Ltd.
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

Maybe this can be the problem? I read about this error, but I cant get a solution. I don't know if I doing something wrong.


Solution

  • cPanel provides 2 different methods of setting the php version. One is called "Select PHP version" which sets the global php version to be used as default for new domains, cron jobs etc, the other is "MultiPHP Manager" which allows you to set different versions of php to be used with different domains under the same cPanel account. You need to make sure "MultiPHP Manager" also lists the correct php version for your domain (It can override "Select PHP version" setting).