6.0.0-alpha12
6/1/25

[#13491] PHP 5.6 RC4 Broke IMAP TLS
Summary PHP 5.6 RC4 Broke IMAP TLS
Queue IMP
Queue Version 6.2.1
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester adorman (at) ironicdesign (dot) com
Created 08/24/2014 (3934 days ago)
Due
Updated 09/16/2014 (3911 days ago)
Assigned 08/24/2014 (3934 days ago)
Resolved 09/16/2014 (3911 days ago)
Milestone
Patch No

History
09/16/2014 06:26:21 AM Michael Slusarz Comment #3
State ⇒ Not A Bug
Reply to this comment
Somebody on the list indicated this was fixed in PHP for 5.6.0.
08/24/2014 10:47:31 PM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
Looks like this:

https://bugs.php.net/bug.php?id=41631

Obviously, this is a regression in PHP behavior and has little/nothing 
to do with IMP (nothing has changed in this code recently).  Someone 
who is experiencing this probably needs to open a PHP bug report and 
provide backtrace information.

My complete shot-in-the dark explanation - this fixed fopen() 
behavior.  But Horde uses stream_socket_client() instead, so the 
timeout behavior may have been broken in that function.
08/24/2014 08:32:06 PM adorman (at) ironicdesign (dot) com Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ PHP 5.6 RC4 Broke IMAP TLS
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
Unable to connect with Cyrus IMAP server with Horde 5.2.1 & IMP 6.2.1 
after updating from PHP 5.6 RC3 to PHP 5.6 RC4 (Debian) today.
After the update I see these log entries for Horde and Cyrus IMAP and 
Imp reports a problem communicating with the server.

2014-08-24T15:00:54.802509-05:00 yorick HORDE: [imp] PHP ERROR: 
fgets(): SSL read operation timed out [pid 32642 on line 153 of 
"/usr/share/php/Horde/Imap/Client/Socket/Connection/Socket.php"]

2014-08-24T15:01:54.613974-05:00 yorick HORDE: [imp] PHP ERROR: 
fgets(): SSL read operation timed out [pid 14455 on line 153 of 
"/usr/share/php/Horde/Imap/Client/Socket/Connection/Socket.php"]

2014-08-24T15:01:54.615668-05:00 yorick HORDE: [imp] [listMailboxes] 
Mail server closed the connection unexpectedly. [pid 14455 on line 732 
of "/usr/share/horde/imp/lib/Imap.php"]

2014-08-24T15:02:00.272601-05:00 yorick cyrus/imap[14427]: accepted connection
2014-08-24T15:02:00.280259-05:00 yorick cyrus/imap[14427]: 
imapd:Loading hard-coded DH parameters
2014-08-24T15:02:00.282538-05:00 yorick cyrus/imap[14427]: TLS Server 
Name Indication (SNI) Extension: "yorick.ironicdesign.com"
2014-08-24T15:02:00.285695-05:00 yorick cyrus/imap[14427]: 
SSL_accept() incomplete -> wait
2014-08-24T15:02:00.324498-05:00 yorick cyrus/imap[14427]: 
SSL_accept() succeeded -> done
2014-08-24T15:02:00.324568-05:00 yorick cyrus/imap[14427]: starttls: 
TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits new) no 
authentication

2014-08-24T15:02:30.396988-05:00 yorick HORDE: [imp] PHP ERROR: 
fgets(): SSL read operation timed out [pid 14453 on line 153 of 
"/usr/share/php/Horde/Imap/Client/Socket/Connection/Socket.php"]

2014-08-24T15:02:30.398703-05:00 yorick HORDE: [imp] [openMailbox] 
Mail server closed the connection unexpectedly. [pid 14453 on line 732 
of "/usr/share/horde/imp/lib/Imap.php"]

If I turn TLS off with $servers ['advanced']['secure'] = false; 
everything works fine.

Saved Queries