|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64402 Cannot open IMAP connections with SSL
Submitted: 2013-03-11 10:16 UTC Modified: 2020-10-16 13:48 UTC
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: craig at craigfrancis dot co dot uk Assigned: cmb (profile)
Status: Not a bug Package: IMAP related
PHP Version: 5.3.22 OS: RedHat/CentOS release 6.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: craig at craigfrancis dot co dot uk
New email:
PHP Version: OS:


 [2013-03-11 10:16 UTC] craig at craigfrancis dot co dot uk
This is with the RPM install of PHP 5.3.3 from RedHat, so I realise I'm not 
running the latest version, however I'm trying to find the source of the issue 
(I believe it is a bug, rather than a config issue).

When opening a connection with the /ssl flag, it returns "Too many arguments 

To reproduce:

$mbox = imap_open('{}INBOX', $user, $pass);

This results in the error message "Too many arguments provided".

Removing the "/ssl" flag:

$mbox = imap_open('{}INBOX', $user, $pass);

Still results in a failed connection (the remote server requires an ssl 
connection), but this kind of fixes the issue.

PHP info shows:

    IMAP c-Client Version => 2007e
    SSL Support => enabled
    Kerberos Support => enabled

Which confirms that SSL support is enabled, and the configure command 

    --with-imap=shared --with-imap-ssl

Do you know how I can debug further?

For reference a bug report has been raised on RedHat bugzilla:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-11 10:41 UTC] craig at craigfrancis dot co dot uk
Sorry, probably not a bug... the password was being stored in a plain text file, 
and ended with a newline.

I presume that because the password then included a newline character, this 
somehow caused the "Too many arguments" error.

However, it is still kind of a bug, because the password should probably be 
escaped, or a more appropriate error returned.
 [2020-10-16 13:48 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2020-10-16 13:48 UTC]
This does not appear to be a bug in PHP, which merely provides the
supplied password on request (mm_login()), and fetches errors from
an error list provided by libc-client.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 05 15:01:31 2024 UTC