cron job and ioncube error problem

alireza tnt

Verified User
Joined
Dec 13, 2016
Messages
5
hi
please help me to resolve this:

run cron job in chrome:
The cron has run within the last 24 hours. To force the cron to run all operations immediately, please invoke with the following arguments "all --force".

run in ssh:
Cannot load the ionCube PHP Loader - extension already loaded
The cron has run within the last 24 hours.
To force the cron to run all operations immediately,
please invoke with the following arguments "all --force".


run php -v:
Cannot load the ionCube PHP Loader - extension already loaded
PHP 5.6.28 (cli) (built: Dec 7 2016 08:32:48)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.2, Copyright (c) 2002-2016, by ionCube Ltd.
with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
 
None of those are errors.

The first one say that the cron has already run in last 24h, so it means that the script have a check to run max once a day.. and it already run...

The second is a arning, because the extension is already loaded it will not be loaded again.
You can see where is loaded trying to look for it with:
grep -R "ioncube" /usr/local/lib/php*

Best regards
 
None of those are errors.

The first one say that the cron has already run in last 24h, so it means that the script have a check to run max once a day.. and it already run...

The second is a arning, because the extension is already loaded it will not be loaded again.
You can see where is loaded trying to look for it with:
grep -R "ioncube" /usr/local/lib/php*

Best regards

the cron job don't run With direct admin. only in ssh with all --force run

how to resolve this:
grep -R "ioncube" /usr/local/lib/php*

Binary file /usr/local/lib/php/extensions/ioncube_loader_lin_5.6.so matches
Binary file /usr/local/lib/php/extensions/ioncube_loader_lin_5.6_ts.so matches
/usr/local/lib/php.conf.d/10-directadmin.ini:zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.6.so
/usr/local/lib/php.ini:zend_extension = /usr/local/lib/php/extensions/ioncube_loader_lin_5.6.so
/usr/local/lib/php.ini:zend_extension_ts = /usr/local/lib/php/extensions/ioncub_loader_lin_5.6_ts.so
 
Ok comment or remove those two lines:

zend_extension = /usr/local/lib/php/extensions/ioncube_loader_lin_5.6.so
zend_extension_ts = /usr/local/lib/php/extensions/ioncub_loader_lin_5.6_ts.so

From:
/usr/local/lib/php.ini

Why you say it don't run, the message say it did run, have you checked the logs to ensure it didn't run? How did you set the cronjob in DA?

Best regards
 
Ok comment or remove those two lines:

zend_extension = /usr/local/lib/php/extensions/ioncube_loader_lin_5.6.so
zend_extension_ts = /usr/local/lib/php/extensions/ioncub_loader_lin_5.6_ts.so

From:
/usr/local/lib/php.ini

Why you say it don't run, the message say it did run, have you checked the logs to ensure it didn't run? How did you set the cronjob in DA?

Best regards

tnx the warning resolve

in ssh run cron job with all --force i receive a email of cron
but in DA i test cron every 5 min but don't receive any email:
php -q /home/admin/domains/mydomain.com/public_html/whmcs/crons/cron.php
/usr/local/lib/php -q /home/admin/domains/mydomain.com/public_html/whmcs/crons/cron.php
/usr/bin/php -q /home/admin/domains/mydomain.com/public_html/portal/whmcs/cron.php
/usr/local/bin/php -q /home/admin/domains/mydomain.com/public_html/whmcs/crons/cron.php
 
So again, that cron have a check in order to NOT run more than once a day, the force will force... if you wanna force from DA aswell add "all --foce" to the line in DA, otherwise will just run once a day as the script require to!

Best regards
 
So again, that cron have a check in order to NOT run more than once a day, the force will force... if you wanna force from DA aswell add "all --foce" to the line in DA, otherwise will just run once a day as the script require to!

Best regards

ok thank you for help.
 
in ssh run cron job with all --force i receive a email of cron
but in DA i test cron every 5 min but don't receive any email

Hello,

I've recently upgraded WHMCS from 6.x to 7.0 and was confused with the changes made in crons. Actually I did face the same warnings when running cron in a console. What I did was removing all the existing cron-tasks for WHMCS and creating only one:

Code:
*/5 * * * * php -q /home/username/crons/cron.php

according to this help pages: http://docs.whmcs.com/Crons#Option_Flags

As soon as 24+ hours passed since the installation (to make sure cron is fine I ran it with all --force​ at the very first time) the cron was executed fine and mail was received.
 
Back
Top