V. 3.6.10 with PHP 8.0.x Problems?

After changing the PHP-Version to 8.0.x PHPList doesn’t work.
I send the Newsletter per Web-Interface and after 1 Mail PHPList is done.

PHP-Error-LOG:
PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /lists/admin/actions/processqueue.php:1328\nStack trace:\n#0 /lists/admin/pageaction.php(20): include()\n#1 /lists/admin/index.php(754): include(’/is/htdocs/wp11…’)\n#2 {main}\n thrown in /lists/admin/actions/processqueue.php on line 1328

PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /lists/admin/actions/processqueue.php:262\nStack trace:\n#0 [internal function]: my_shutdown()\n#1 {main}\n thrown in /lists/admin/actions/processqueue.php on line 262

@email71272 Going by the line numbers shown this is the line of code that is failing, the last line.
$counters['sent'] must be 0. But that is executed only when the $counters['sent'] > 0 so this doesn’t seem to make sense.

    if ($counters['sent'] > 0) {
        $msgperhour = (3600 / $totaltime) * $counters['sent'];
        $secpermsg = $totaltime / $counters['sent'];

Does this repeatedly happen?

I don’t know what you mean with repeatedly.

The same code ist in line 262 & 1328.
After restarting the queue phpList sents always only 1 mail.

That is what I meant.
Have you changed the source code in the file admin/actions/processqueue.php because the second fatal error seem to be referring to a different variable?

No, I don’t make any chances. This is an original Installation.

@email71272 To try to work-around the problem you could try editing the file admin/actions/processqueue.php

line 1328 is

        $secpermsg = $totaltime / $counters['sent'];

replace that by

        $secpermsg = 1;

That will probably make the phplist sending rate statistics not be correct but might avoid the problem.

It doesn’t work.

I also delete this line as in line 1229.
No more errormessages in the logfile, but the problem is still alive.

@email71272

but the problem is still alive.

What do you mean by this?

Try enabling verbose logging by phplist by adding or changing this line in the config.php file. Then look at the Event Log page after processing the queue to see any extra output

define('VERBOSE', 1);

The same errors:

PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /newsletter/lists/admin/actions/processqueue.php:1328\nStack trace:\n#0 /newsletter/lists/admin/pageaction.php(20): include()\n#1 /newsletter/lists/admin/index.php(754): include(’/is/htdocs/wp11…’)\n#2 {main}\n thrown in newsletter/lists/admin/actions/processqueue.php on line 1328

PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /newsletter/lists/admin/actions/processqueue.php:262\nStack trace:\n#0 [internal function]: my_shutdown()\n#1 {main}\n thrown in /newsletter/lists/admin/actions/processqueue.php on line 262

@email71272 Sorry but I don’t understand what is happening. Can you revert to using whichever version of php was working before?

No. PHP 7.4.x is EOL.

@email71272 Yes but at least it works. Or use php 8.1 which is the latest major version and works fine for me.

Otherwise you will have to try to debug what is happening. Line 1328 should not have a divide by zero so I cannot see why it is happening.

I tested PHP 8.1 and it doesn’t work, too.
Perhaps, there’s a problem with some misconfiguration in php.ini with this hoster/provider. I don’t know.

THX for your help.

same problem > phpList 3.6.10 / php 8.x
Provider strato/hosteurope