OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: Davesworld on July 28, 2022, 07:02:29 pm

Title: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: Davesworld on July 28, 2022, 07:02:29 pm
 I get this:
PHP Fatal error:  __autoload() is no longer supported, use spl_autoload_register() instead in /usr/local/share/phpmailer/PHPMailerAutoload.php on line 45

Is this a residual from when I used to have my config files mailed every night? That plugin was deprecated and there was no way to remove it within the gui so I hand edited it out of the config and reloaded it so I would not keep seeing it in the plugins as unavailable yet no way to remove it once updated.

EDIT SOLVED:
 I simply uninstalled PHPmailer from the command line and it also uninstalled os-mail-backup. Now the Cron starts with no errors.
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: franco on July 28, 2022, 08:53:16 pm
Looks like PHPmailer doesn't fully support PHP 8 yet. Bummer.


Cheers,
Franco
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: Davesworld on July 28, 2022, 09:19:04 pm
Was I right to remove it? The backup mailer became defunct because your team had questions about security. I see the php mailer and os-mail-backup as residual because once it became defunct with an os upgrade, there was no way to remove it through the gui. If I had downgraded, removed the plugin and then upgraded again at that time I am sure none of this would have happened unless you know better.

My config file no longer has that defunct plugin so if I did a clean install with the new config I doubt the php mailer and the os-mail-backup would ever be installed. I will find out on Saturday as I am building a fanless machine that is in a 1U case that has heatpipe and a huge heat sink on one side. Because of the heat sink it can only take a mini-itx. EPCY 3000 series are in my future. With these cases the power can't be over 95 watts.
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: Davesworld on July 29, 2022, 12:51:14 am
Looks like PHPmailer doesn't fully support PHP 8 yet. Bummer.


Cheers,
Franco

But do we really need it with the config backup mailer gone?
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: franco on July 29, 2022, 08:33:15 am
You did the right thing.

PHP 8 has had some things changed and not all third party software seems to be ready.


Cheers,
Franco
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: Davesworld on July 29, 2022, 05:54:16 pm
You did the right thing.

PHP 8 has had some things changed and not all third party software seems to be ready.


Cheers,
Franco

The 3rd party plugin is no longer available in recent versions anyway. Once I removed those two pieces I haven't had any surprises.
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: franco on July 29, 2022, 08:18:35 pm
Ah yes now I remember. You are right.

That would also explain why the stale package has no PHP 8 support, because it was never updated again.


Cheers,
Franco
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: JumpySkippy on July 31, 2022, 01:20:58 pm
EDIT SOLVED:
 I simply uninstalled PHPmailer from the command line and it also uninstalled os-mail-backup. Now the Cron starts with no errors.
I have the same problem with os-mail-backup.
Could you please post the command to uninstall PHPmailer via command line?
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: franco on July 31, 2022, 01:22:06 pm
# pkg remove os-mail-backup
# pkg autoremove


Cheers,
Franco
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: JumpySkippy on July 31, 2022, 02:18:33 pm
Thank you very much, that worked great!  :)
Title: Re: CRON Not Starting due to phpmailer error. (SOLVED)
Post by: marmor3 on February 18, 2023, 10:35:30 pm
you can also uninstall os-mail-backup from the graphical interface. "system - firmware - plugins"

I had the same problem, cron did not work and I could not access the backup page either.

PHP Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in /usr/local/share/phpmailer/PHPMailerAutoload.php on line 45

After I uninstalled os-mail-backup via the graphical user interface after Davesworld's hint here, both work. Thanks a lot.