Bug #64402 [Opn->Nab]: Cannot open IMAP connections with SSL

From: Date: Fri, 16 Oct 2020 13:48:31 +0000
Subject: Bug #64402 [Opn->Nab]: Cannot open IMAP connections with SSL
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229660@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64402&edit=1

 ID:                 64402
 Updated by:         cmb@php.net
 Reported by:        craig at craigfrancis dot co dot uk
 Summary:            Cannot open IMAP connections with SSL
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            IMAP related
 Operating System:   RedHat/CentOS release 6.4
 PHP Version:        5.3.22
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2013-03-11 10:41:57] 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.

------------------------------------------------------------------------
[2013-03-11 10:16:11] craig at craigfrancis dot co dot uk

Description:
------------
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 
provided".

To reproduce:

<?php
$mbox = imap_open('{imap.domain.com:993/imap/ssl}INBOX', $user, $pass);
print_r(imap_errors());
?>

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

Removing the "/ssl" flag:

<?php
$mbox = imap_open('{imap.domain.com:993/imap}INBOX', $user, $pass);
print_r(imap_errors());
?>

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 
includes:

    --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:

    https://bugzilla.redhat.com/show_bug.cgi?id=919506



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=64402&edit=1


Thread (3 messages)

« previous php.bugs (#229660) next »