php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61846 imap timeout not working with ssl
Submitted: 2012-04-25 05:18 UTC Modified: 2016-10-19 15:24 UTC
Votes:29
Avg. Score:4.7 ± 0.5
Reproduced:28 of 28 (100.0%)
Same Version:10 (35.7%)
Same OS:21 (75.0%)
From: rahul dot mishra at webyog dot com Assigned:
Status: Open Package: IMAP related
PHP Version: 5.4.0 OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-04-25 05:18 UTC] rahul dot mishra at webyog dot com
Description:
------------
imap timeout not working if i have used ssl in server name. In case i have not  used ssl then after 10s it will be timeout but its not working with ssl.

Test script:
---------------
imap_timeout(IMAP_READTIMEOUT, 10);
imap_timeout(IMAP_OPENTIMEOUT, 10);
$imap_connect = imap_open("{mail.yahoo.com:993/ssl/novalidate-cert}", $user, $pwd);

Expected result:
----------------
After 10s imap_open show show timeout even server address having ssl.

Actual result:
--------------
If i have used ssl then imap_open takes hell lot of time to return a response. timeout is ignored.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-07 15:14 UTC] nicolas dot badia at ymail dot com
Same problem for me.
 [2015-11-05 12:07 UTC] info at phpgangsta dot de
Same problem here, imap_open() takes forever on SSL servers that don't send a "connection refused", but just drop the packets in their firewall or so...

$connectionString = '{imap4.versatel.de:993/imap4rev1/novalidate-cert/ssl}INBOX';
imap_timeout(IMAP_OPENTIMEOUT, 5);
imap_timeout(IMAP_READTIMEOUT, 5);
imap_timeout(IMAP_WRITETIMEOUT, 5);
imap_timeout(IMAP_CLOSETIMEOUT, 5);
$mbox = imap_open($connectionString, 'someone', 'somepass', OP_HALFOPEN, 1);
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 18:01:26 2019 UTC