XF 1.5 Errors related to bounce handler?

Floyd R Turbo

Well-known member
I haven't changed anything in a while, but al of the sudden, I'm getting all kinds of server errors that seem related to the bounce handler system. The look like this

Code:
Zend_Mail_Protocol_Exception: cannot connect to host; error = (errno = 0 ) - library/Zend/Mail/Protocol/Imap.php:100
Generated By: Unknown Account, 4 minutes ago
Stack Trace

#0 /home/***/public_html/library/Zend/Mail/Storage/Imap.php(273): Zend_Mail_Protocol_Imap->connect('***.***.co...', 993, 'SSL')
#1 /home/***/public_html/library/XenForo/Model/EmailBounce.php(304): Zend_Mail_Storage_Imap->__construct(Array)
#2 /home/***/public_html/library/XenForo/Deferred/EmailBounce.php(19): XenForo_Model_EmailBounce->openBounceHandlerConnection()
#3 /home/***/public_html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_EmailBounce->execute(Array, Array, 7.99999904633, '')
#4 /home/***/public_html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.99999904633, '', false)
#5 /home/***/public_html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 /home/***/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#7 {main}

Request State

array(3) {
  ["url"] => string(51) "https://www.***.org/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(28) "/admin.php?logs/server-error"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

or this (when I manually run the cron to check for bounces, which is says it runs successfully, but it doesn't actually clear out the mailbox and import the bounces)

Code:
Zend_Mail_Protocol_Exception: cannot connect to host; error = (errno = 0 ) - library/Zend/Mail/Protocol/Imap.php:100
Generated By: Unknown Account, 21 minutes ago
Stack Trace

#0 /home/***/public_html/library/Zend/Mail/Storage/Imap.php(273): Zend_Mail_Protocol_Imap->connect('***.***.co...', 993, 'SSL')
#1 /home/***/public_html/library/XenForo/Model/EmailBounce.php(304): Zend_Mail_Storage_Imap->__construct(Array)
#2 /home/***/public_html/library/XenForo/Deferred/EmailBounce.php(19): XenForo_Model_EmailBounce->openBounceHandlerConnection()
#3 /home/***/public_html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_EmailBounce->execute(Array, Array, 7.99999785423, '')
#4 /home/***/public_html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.99999785423, '', false)
#5 /home/***/public_html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 /home/***/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#7 {main}

Request State

array(3) {
  ["url"] => string(51) "https://www.***.org/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(16) "/admin.php?cron/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

somtimes the request state is with a thread (not sure what request state means or if that matters)

Code:
Zend_Mail_Protocol_Exception: cannot connect to host; error = (errno = 0 ) - library/Zend/Mail/Protocol/Imap.php:100
Generated By: Unknown Account, Today at 6:23 AM
Stack Trace

#0 /home/***/public_html/library/Zend/Mail/Storage/Imap.php(273): Zend_Mail_Protocol_Imap->connect('***.***.co...', 993, 'SSL')
#1 /home/***/public_html/library/XenForo/Model/EmailBounce.php(304): Zend_Mail_Storage_Imap->__construct(Array)
#2 /home/***/public_html/library/XenForo/Deferred/EmailBounce.php(19): XenForo_Model_EmailBounce->openBounceHandlerConnection()
#3 /home/***/public_html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_EmailBounce->execute(Array, Array, 7.99999785423, '')
#4 /home/***/public_html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.99999785423, '', false)
#5 /home/***/public_html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 /home/***/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#7 {main}

Request State

array(3) {
  ["url"] => string(51) "https://www.***.org/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(30) "/threads/diy-food.27848/page-2"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

Any idea? I reached out to the host to see if they could see anything wrong.

When I run
 
So I also have a 3rd forum on the same server, vanilla install (private board) and same things were happening, but to a lesser extent due to no traffic.

I bumped the PHP version on that install (1.5.14) to 7.0 and got the 'an unexpected database error has occurred" message. Same with 7.1.

Assuming you're using cpanel EasyApache4 and multiple PHP version support via their RPM packages, make sure that each of cpanel's php version's (5.5, 5.6, 7.0, 7.1 etc) that you have configured to use have their respective php extensions installed. You could be missing some php extensions for a specific php version(s). Very simple for a system admin to check this and install any missing cpanel PHP extension's RPM packages.
 
Top Bottom