php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29036 imap with ssl not working on windows
Submitted: 2004-07-06 21:18 UTC Modified: 2007-02-19 16:05 UTC
Votes:6
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:3 (75.0%)
From: josef dot spangler at rz dot uni-regensburg dot de Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.3.6 OS: Windows
Private report: No CVE-ID:
 [2004-07-06 21:18 UTC] josef dot spangler at rz dot uni-regensburg dot de
Description:
------------
The php_imap extension is unable to connect over ssl to an imap server. The reason is because the ssl engine is not initialized: 
In php_imap.c Line 435 the function 
  ssl_onceonlyinit ();
is not called on windows systems. 

The following fix will correct this:
*** php_imap.c.org	Thu Jan 15 01:36:08 2004
--- php_imap.c	Thu May 06 13:28:30 2004
***************
*** 427,438 ****
  #ifndef PHP_WIN32
  	auth_link(&auth_log);		/* link in the log authenticator */
  	auth_link(&auth_md5);       /* link in the cram-md5 authenticator */ 
  #if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
  	auth_link(&auth_gss);		/* link in the gss authenticator */
  #endif
  
  #ifdef HAVE_IMAP_SSL
  	ssl_onceonlyinit ();
- #endif
  #endif

--- 427,438 ----
  #ifndef PHP_WIN32
  	auth_link(&auth_log);		/* link in the log authenticator */
  	auth_link(&auth_md5);       /* link in the cram-md5 authenticator */ 
  #if HAVE_IMAP_KRB && defined(HAVE_IMAP_AUTH_GSS)
  	auth_link(&auth_gss);		/* link in the gss authenticator */
  #endif
+ #endif
  
  #ifdef HAVE_IMAP_SSL
  	ssl_onceonlyinit ();
  #endif



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-08 11:33 UTC] sniper@php.net
It won't help much since we don't build the c-client library on windows with SSL support.. And the .dsp file should be edited too, did you to that? (give a diff for that if you did :)

 [2004-07-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-08-25 17:29 UTC] dweingart at pobox dot com
sniper@php.net wrote:

> It won't help much since we don't build the c-client library 
> on windows with SSL support.

Does this mean that the imap_* functions on the Windows platforms won't work over SSL at all? Even with the openssl extension enabled?

If so, that's probably a documentation bug, since the IMAP section of the manual should probably mention that the SSL-enabled examples won't work on Windows.
 [2007-02-19 16:05 UTC] edink@php.net
Better late than never, fixed in 5.2.2 :)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 18:01:55 2014 UTC