pingnd Posted December 6, 2019 Share Posted December 6, 2019 Hi everyone, I'm looking for some guidance here. I setup WHMCS and it is working fine and I setup my Cron jobs in cPanel for the website. I'm on a HostGator reseller package. However, I am getting the below e-mails where it is complaining about ionCube and and the PHP version. I figured I needed a higher version of PHP and unfortunately, the PHP selector only allows you to change the default folder by folder. I had HostGator create .htaccess files everywhere to force PHP 7.1 but that does not seem to have solved this issue. Any pointers would be great. Thank you! <br /><b>Fatal error</b>: The file /home2/<USERNAME>/public_html/clients/crons/cron.php cannot be run by the ionCube Loader. Please ask the script provider to supply an encoded file that can run on your version of PHP, 5.4. in <b>Unknown</b> on line <b>0</b><br /> 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted December 8, 2019 Share Posted December 8, 2019 (edited) Hi, The problem is that cron daemon still uses PHP 5.4 as default. Someone forgot to change it. You should ask your server admin to make sure that crons run with a decent version of PHP. Edited December 8, 2019 by Kian 1 Quote Link to comment Share on other sites More sharing options...
tronyx Posted March 13, 2020 Share Posted March 13, 2020 I am having this problem right now. This is what I found. I moved my Cron folder outside the public_html and forgot to create the config.php. WHMCS has a config.php.new file in the folder and you need to rename it AND point to your WHMCS location directory under the public_html directory. I also had my WH admin change the PHP version to 5.6. 0 Quote Link to comment Share on other sites More sharing options...
tronyx Posted March 13, 2020 Share Posted March 13, 2020 Hi All, Well, that didn't work, lol. Woke up to these emails: <br /><b>Fatal error</b>: The file /home1/tronyx/crons/domainsync.php cannot be run by the ionCube Loader. Please ask the script provider to supply an encoded file that can run on your version of PHP, 5.4. in <b>Unknown</b> on line <b>0</b><br /> <br /><b>Fatal error</b>: The file /home1/tronyx/crons/cron.php cannot be run by the ionCube Loader. Please ask the script provider to supply an encoded file that can run on your version of PHP, 5.4. in <b>Unknown</b> on line <b>0</b><br /> So the file cron.php, (and domainsync.php) can't be run on ionCube because my server is running PHP54? This can't be a new thing with WHMCS and WH's, can it? 0 Quote Link to comment Share on other sites More sharing options...
tronyx Posted March 13, 2020 Share Posted March 13, 2020 Any help would really be appreciated. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted March 14, 2020 Share Posted March 14, 2020 Your cPanel is using PHP 5.4 to run crons hence the error. Make sure your cPanel uses PHP 7.2 to solve the issue. 0 Quote Link to comment Share on other sites More sharing options...
tronyx Posted March 14, 2020 Share Posted March 14, 2020 Thanks Kian, I have set some of the directories manually. I asked my WH to cascade it throughout my domain but they have/did NOT. I also believe that the cron daemon is running PHP54 and needs to be updated. However, when I speak to support they are simply Googling answers and telling me they have done this, or that, but not really doing anything. I am getting frustrated and wish I had access to do it myself, but sadly, I do not have access. I will continue to 'bother' them until I get an admin. COVID 19 has been keeping all of us rather busy too. 0 Quote Link to comment Share on other sites More sharing options...
carlswart Posted June 11, 2020 Share Posted June 11, 2020 If you have not yet been able to fix this, I think that you have configured your cron to use the system default PHP, which seems to be version 5.4, instead of the version your site makes use of. Here is an example for my crontab entry: */5 * * * * /opt/plesk/php/7.2/bin/php -c /var/www/vhosts/system/example.com/etc/php.ini /var/www/vhosts/example.com/private/crons/cron.php You will need to adjust the above to match your hosting environment. 0 Quote Link to comment Share on other sites More sharing options...
tronyx Posted June 11, 2020 Share Posted June 11, 2020 @carlswart Testing that right now... 0 Quote Link to comment Share on other sites More sharing options...
tronyx Posted June 11, 2020 Share Posted June 11, 2020 Result: /usr/local/cpanel/bin/jailshell: opt/plesk/php/7.2/bin/php: No such file or directory What has been working is: /opt/php56/bin/php/home/delta/crons/cron.php Thank you for replying. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted June 12, 2020 Share Posted June 12, 2020 @tronyx Thanks for your post, as you are using cPanel, not Plesk opt/plesk/php/7.2/bin/php will not work for you. Instead ask your host for the path to PHP 7.2 it will be along the lines of "/opt/php72/bin/php" making your cron command /opt/php72/bin/php -q /path/to/cron/cron.php 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.