Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 919506

Summary: Cannot open IMAP connections with SSL in PHP
Product: Red Hat Enterprise Linux 6 Reporter: Craig Francis <craig>
Component: phpAssignee: Remi Collet <rcollet>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3CC: craig, rcollet
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-11 13:01:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Craig Francis 2013-03-08 16:46:19 UTC
When opening a connection with the /ssl flag returns "Too many arguments provided".

It appears that the "php-imap" extension has not been compiled with SSL support.

Package: php-imap-5.3.3-14.el6_3.x86_64

---

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.

When compiling PHP, I suspect the additional flags should be given:

http://www.php.net/manual/en/imap.installation.php

> Note: Depending on how the c-client was configured,
> you might also need to add --with-imap-ssl=/path/
> and/or --with-kerberos=/path/ to the PHP configure line.

Comment 1 Remi Collet 2013-03-11 07:33:27 UTC
I confirm that imap extension is build with ssl and kerberos support.

From "php -i" output:

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

I cannot reproduce this problem.

Comment 2 Remi Collet 2013-03-11 08:51:08 UTC
Please check the output of "php -i" or phpinfo() (the IMAP section)

Comment 3 Craig Francis 2013-03-11 10:45:47 UTC
Thanks for checking, you are right, this is not a bug with the RedHat RPM.

I have since found that the password I was providing (stored in a separate text file), contained a newline character by mistake.

I still believe this is a bug, but one that PHP should deal with:

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

Comment 4 Remi Collet 2013-03-11 13:01:53 UTC
Thanks for reporting this minor issue to PHP upstream.

As your problem is explained / solved, I close this bug.

If this issue is critical or in any way time sensitive, please raise a ticket through your regular Red Hat support channels to make certain  it receives the proper attention and prioritization to assure a timely resolution. 

For information on how to contact the Red Hat production support team, please visit:
    https://www.redhat.com/support/process/production/#howto