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.
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?
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
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
Hi!
I have the same error with provider being Strato. I am pretty sure it is not the line
“$secpermsg = $totaltime / $counters[‘sent’];”
but instead the line
“$msgperhour = (3600 / $totaltime) * $counters[‘sent’];”.
This is line 1327 in the original code - maybe email71272 has added a line above.
It seems that the line
“$totaltime = $GLOBALS[‘processqueue_timer’]->elapsed(1);”
does not work as expected which also explains the error in line 262 (a division by $totaltime, as well).
I also noticed a warning about a non-numeric value. Could that be?
I get the same problem (at the same hosting company, hosteurope) and so I can report that inserting those two lines in processqueue.php displays nothing.
Here is what I get in the message window:
Processing queued campaigns
Please wait, processing your request
Giving a UUID to 3 subscribers, this may take a while
Maximum time for queue processing: 60
Started
select id from phplist_message where status not in (“draft”, “sent”, “prepared”, “suspended”) and embargo <= now() order by entered limit 5
Processing has started,
One campaign to process.
Please leave this window open. phpList will process your queue until all messages have been sent. This may take a while
Report of processing will be sent by email
sending of this campaign will stop, if it is still going in 6 days 23 hours 59 mins 29 secs
Processing message 2
Looking for users
User select query select distinct u.id from phplist_listuser as listuser
inner join phplist_user_user as u ON u.id = listuser.userid
inner join phplist_listmessage as listmessage ON listuser.listid = listmessage.listid
left join phplist_usermessage as um ON (um.messageid = 2 and um.userid = listuser.userid)
where
listmessage.messageid = 2
and listmessage.listid = listuser.listid
and u.id = listuser.userid
and um.userid IS NULL
and u.confirmed and !u.blacklisted and !u.disabled
Found them: 4 to process
Sending 2 to ab.c@xxx.yy
It took 0,0898380000 seconds to send
Sending in batches of 1,000 emails
Script stage: 5
We skipped over php8 opting instead to go straight to php8.1 and have had no problems with phpList at all. So, if that is an option for you, I would suggest making the hop.
I solved the issue with a combination of measures:
mark all active messages that have been submitted but not sent properly as sent.
in phpadmin make a change to the database.
2.1. select phplist_sendprocess and delete all lines that show up.
make the change in line 1326 of actions/processqueue.php ( Avoid possible divide by zero when calculating message send rate #925 ), as suggested above by Duncan.