Patch for PHP --with-imap-ssl

Fritz Zaucker zaucker@ee.ethz.ch
Fri, 12 Apr 2002 08:34:09 +0200 (MEST)


Apparently PHP from version 4.1.something tries to connect to the IMAP
server over SSL if the protocol string is set to 'imap' and not only if set
to 'imap/ssl'. PHP can be forced to use imap without ssl by specifying
'imap/notls' as protocol.

1) I think the comments in servers.php should be changed to reflect this:

   - * protocol is one of 'imap', 'pop3', 'imap/ssl', or 'pop3/ssl'. If
   + * protocol is one of 'imap/notls', 'pop3', 'imap/ssl', or 'pop3/ssl'. If

   This also works on a PHP that uses an non-ssl-enabled c-client.

2) The select box for change_protocol in templates/login/login.inc should
   also be changed:


-            <option value="imap"<?php if ($protocol == 'imap') echo ' selected="selected"' ?>>IMAP</option>
+            <option value="imap/notls"<?php if ($protocol == 'imap') echo ' selected="selected"' ?>>IMAP</option>

Or am I missing something?

Best regards,
Fritz

P.S.: Another option might be to check in lib/IMP.php if protocol is 'imap'
      and change it there to 'imap/notls'.

-- 
Dr. Fritz Zaucker, Head IT Support Group
Department of Information Technology and Electrical Engineering
Swiss Federal Institute of Technology
ETZ J97, Gloriastrasse 35, CH-8092 Zurich, Switzerland
Tel.: +41-1-632-5241 Fax: +41-1-632-1194 http://people.ee.ethz.ch/~zaucker/
E-mail: zaucker@ee.ethz.ch (see home page for PGP key)