php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36496 SSL support in imap_open@php_imap.dll not working
Submitted: 2006-02-23 10:17 UTC Modified: 2007-02-19 16:07 UTC
Votes:31
Avg. Score:4.6 ± 0.7
Reproduced:30 of 30 (100.0%)
Same Version:17 (56.7%)
Same OS:23 (76.7%)
From: krejci at ped dot muni dot cz Assigned: edink
Status: Closed Package: IMAP related
PHP Version: 5.1.4 OS: WinXP, Win2003
Private report: No CVE-ID:
 [2006-02-23 10:17 UTC] krejci at ped dot muni dot cz
Description:
------------
tested on WinXPSP2+IIS5.1 and Win2003StdSP1+IIS6

loaded modules:
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_imap.dll 
;php_imap.dll md5: 29f661116b793acad732b3feb404a406
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_openssl.dll

phpinfo shows:
IMAP c-Client Version:  2004  
SSL Support:  enabled  


Reproduce code:
---------------
<?php  
        $connection = imap_open("{pop.gmail.com:995/pop3/ssl/novalidate-cert}", "username", "password");
 
        if ($connection) {
            imap_close($connection);
            echo("OK");
        }
        else {
          echo("ERROR");
        }
?>


Expected result:
----------------
I expect that a ssl-connection to pop.gmail.com would be established
OR 
that at least a Warning about missing SSL support would show up.

Actual result:
--------------
Warning: imap_open() [function.imap-open]: Couldn't open stream {pop.gmail.com:995/pop3/ssl/novalidate-cert} in c:\Inetpub\wwwroot\test\pop-real-ssl.bugrep.php on line 2
ERROR
Notice: Unknown: Can't open mailbox {pop.gmail.com:995/pop3/ssl/novalidate-cert}: invalid remote specification (errflg=2) in Unknown on line 0

No packet is actually sent.
If I omit the "/ssl/novalidate-cert" part, everything works fine.
It seems that the SSL support is not compiled in the windows binaries, despite of what the phpinfo says.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-23 17:46 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-02-23 21:59 UTC] krejci at ped dot muni dot cz
Tried 
PHP Version 5.1.3-dev
Build Date:	Feb 20 2006 00:19:29

no change, no luck, still not working.
 [2006-02-23 22:05 UTC] tony2001@php.net
Ilia, please check it out.
 [2006-03-17 20:10 UTC] stanciu dot ionut at gmail dot com
I have the same problem ... i try everything but nothing :(
 [2006-03-17 22:47 UTC] fmk@php.net
I think openssl must be static linked to PHP for this to work.

The functions in on extension would not know how or where to call functions in another extension when they both are linked dynamic.
 [2006-05-28 19:14 UTC] krejci at ped dot muni dot cz
Hi, please don't forget me ;-)

No change upto latest 5.1.5-dev
(Build Date: May 7 2006 00:16:05)
 [2006-05-31 18:36 UTC] mike@php.net
Just a sidenote: on can link extensions on Windows, if this is really the problem.
 [2006-07-14 15:11 UTC] olivier dot monaco at free dot fr
Patch from http://bugs.php.net/bug.php?id=29036 seems to never be tested. Maybe the answer...
 [2006-07-30 07:33 UTC] piotr dot rezmer at ens dot net dot pl
The problem exists also in PHP 5.2 (snapshot php5.2-win32-200607291830.zip) and PHP 6.0 (php6.0-win32-200607291630.zip)
 [2006-07-30 08:16 UTC] piotr dot rezmer at ens dot net dot pl
the problem relates to mail_open() function which is called within imap_open().
 [2007-02-19 16:07 UTC] edink@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks to olivier dot monaco at free dot fr for giving a good hint :)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 10:02:09 2014 UTC