Page 1 of 2

Cron error

Posted: Thu Jan 20, 2022 3:43 pm
by Graeme59
Hi,
I am getting a cron error when trying to send reports,
Forma 3.0.1, php7.4.

Cron script
/usr/bin/php74 -q public_html/cron/cron.report.php

'PHP Fatal error: Uncaught Error: Class 'DoceboMailer' not found in /home/....../public_html/cron/cron.report.php:307
Stack trace:
#0 {main}
thrown in /home/...../public_html/cron/cron.report.php on line 307'

Any help would be appreciated
Cheers
Graeme

Re: Cron error

Posted: Thu Jan 20, 2022 4:01 pm
by alfa24
Are you sure you are using 3.0 /cron/cron.report.php?

Re: Cron error

Posted: Thu Jan 20, 2022 4:11 pm
by Graeme59
Hi Alfa,
Forma version 3.01
Cheers
Graeme

Re: Cron error

Posted: Thu Jan 20, 2022 4:13 pm
by Graeme59
line 307
$mailer = DoceboMailer::getInstance();

Re: Cron error

Posted: Thu Jan 20, 2022 4:16 pm
by alfa24
Ready to bet you have still cron.report.php from a 2.x version.

Re: Cron error

Posted: Thu Jan 20, 2022 4:19 pm
by Graeme59
I am downloading a fresh copy of 3.01, I will delete the old and replace the cron folder and test.
Let you know what happens

Re: Cron error

Posted: Thu Jan 20, 2022 4:31 pm
by Graeme59
Same error

PHP Fatal error: Uncaught Error: Class 'DoceboMailer' not found in /home/...../public_html/cron/cron.report.php:307
Stack trace:
#0 {main}
thrown in /home/....../public_html/cron/cron.report.php on line 307

Re: Cron error

Posted: Thu Jan 20, 2022 4:41 pm
by alfa24
Unfortunately I've not access to 3.01, it seems much has changed since 3.0.

Re: Cron error

Posted: Thu Jan 20, 2022 4:47 pm
by Graeme59
Your right it is very different, I have just looked at the version 3.0 cron.report.php
3.0
$mailer = FormaMailer::getInstance();

3.01
$mailer = DoceboMailer::getInstance();

Re: Cron error

Posted: Thu Jan 20, 2022 5:10 pm
by alfa24
Yes, 3.0 has that line but it's 278.
I can debug it (and fix) on your instance, as I - repeat - can't access a 3.01.