Cronjobs Errors Please help

I am facing problems with cron jobs. Please help me fix.

Error 1:- When I enter this below in cron jobs
sudo /usr/bin/php -q /home/test/web/test.com/public_html/account/crons/cron.php

I am getting this error
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required

Error 2:- Now when I try with curl
/usr/bin/curl /usr/bin/php -q /home/test/web/test.com/public_html/account/crons/cron.php

I am getting the error now
curl: (3) URL using bad/illegal format or missing URL

Note I have entered right url where test.com is my domain name.

Please help me fix it and how to enter right cronjob also ioncube loader is also installed. Your help will be appreciated. Thank you.

You don’t need sudo to execute permissions as test user

Just use

/usr/bin/php /home/test/web/test.com/public_html/account/crons/cron.php

For

/usr/bin/curl /usr/bin/php  -q /home/test/web/test.com/public_html/account/crons/cron.php

is not a valid url

/usr/bin/php -q /home/test/web/test.com/public_html/account/crons/cron.php

I am still getting error how to fix it.

Here is the error again

PHP Fatal error: The file /home/test/web/itest.com/public_html/account/crons/cron.php encoded as type [1/81] cannot be decoded by this version of the ionCube Loader.
in Unknown on line 0

I have tried with pho 7.4 and 8 also but getting same error and website is up and running only have with cronjob.

I am using real domain name I just changed it to test here on the forum.

Make sure IonCube is installed

Als use /usr/bin/7.4 in this case as 8.0 doesn’t support ionCube …

1 Like

I got it now. Finally working with php7.4 with below path. Thanks you eris.

/usr/bin.php7.4 /home/test/web/test.com/public_html/account/crons/cron.php

Worked successfully!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.