Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16926

Error when sending group PM (to multiple recipients)



    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 3.3.2
    • None
    • Private Messages (PM)
    • PHP 7.4
      MariaDB 10.3.32
      Litespeed 6.0.11


      For some reason, when sending a group PM (to a group with more than 1 recipient, obviously), regardless whether the "SMTP setting" is turned ON or OFF, and whether the email notifications in that case are being sent out by SMTP or PHP mail(), this error keeps popping up:

      Fatal error: SQL ERROR [ mysqli ]
      MySQL server has gone away [2006]
      SELECT COUNT(n.notification_id) AS unread_count FROM phpbb_notifications n, phpbb_notification_types nt WHERE n.user_id = 2 AND n.notification_read = 0 AND nt.notification_type_id = n.notification_type_id AND nt.notification_type_enabled = 1 in /home/public_html/forum/phpbb/db/driver/driver.php on line 1023

      ...except that it has nothing to do with mySQL - it's not a mySQL issue as it's running fine, it doesn't just "go away" as noted in the error message and there isn't a single indication of it doing so OR logging any sort of an error when this happens in any sort of mySQL logs.

      I tinkered a bit with code responsible for sending email notifications to all users when they receive a PM, and disabling that option (email notification being sent) in code fixes this and I never see this error pop up again.
      The second I reset the code to its default and re-enable email notifications, this error comes right back up.
      So it's something to do with that email sending function somehow, and why does it throw a mySQL error is beyond me, especially when that query posted evaluates in milliseconds (when tried directly in phpMyAdmin) and is obviously not even related to the issue at hand.
      Please investigate. 




            Unassigned Unassigned
            Crazy Serb Crazy Serb [X] (Inactive)
            0 Vote for this issue
            2 Start watching this issue