[imp] PHP 4.1.2 changed IMAP and breaks IMP [was Re: [imp] Login problem narrowed down.]

robert sand rsand@d.umn.edu
Fri, 01 Mar 2002 11:41:49 -0600


Exactly.  This too was my problem.  PHP 4.1.2 uses ssl even if your connection 
is not ssl when you have compiled your imapd and c-client with ssl.  using the 
/notls will fix it if you do not want to use ssl.

Mike Baptiste wrote:

> FOr IMP v2.2.x, I changed the port variable in my servers config file
> 
> I simply changed 143 to '143/notls' and I was able to login again.
> 
> So if you have a c-client compiled for SSL and you build PHP 4.1.x for 
> SSL imap, you have to include the notls option in any server you access 
> via the non SSL port (143)  At least that was what I had to do to get my 
> IMP installations working again with non SSL IMAP ports.
> 
> Mike
> 
> Mike Baptiste wrote:
> 
>> SUCCESS!!!!  PHP 4.1.2 has changed the way imap works - if you compile 
>> your c-client for SSL, PHP will alwyas use SSL unless you tell it not 
>> to!!!!!
>>
>> Turns out my 3.0 installation was using all port 143 imap.  I thought 
>> I had some SSL going on.
>>
>> Anyway, if I set a 3.0 server to ssl imap, I can login.  But if I try 
>> to use port 143, PHP seems to still try to do SSL no matter what and 
>> of course it fails.  VERY bizarre.  IMP 2.2.x, of course, fails to 
>> login with the new PHP (4.1.2)  This was the only thing that changed.
>>
>> I came across this tidbit on php.net - looks like there is a new 
>> protocol option to force an SSL compiled c-client to use non-ssl where 
>> before PHP did it for you?
>>
>> toshe_bg@yahoo.com
>> 21-Feb-2002 10:47
>>
>> I have downloaded IMAP webmail and tried to install it. My 
>> configuration is
>> Slackware 8 with Apache 1.3.20. Webmail require PHP 4.1.1 so I 
>> download it
>> and compile with options:
>> ./configure --with-mysql  --with-apxs  --enable- trans-sid --with-gettext
>> --with-imap=/usr/local/lib --with-imap-ssl=/usr/local/lib
>> I use c-client from imap-2001a and have libc-client.a in /usr/locla/lib.
>> When I tried to run Webmail I always got error " TLS/SSL failure for
>> localhost: SSL negotiation failed". I note that there is no request
>> to IMAP server, so the problems is in the c-client itself. After a few
>> hours tests and many READMEs I found in c-client documentation that the
>> correct url for IMAP connection is
>> {imapserver:143/notls}INBOX
>> /notls is to disable TLS connection.
>> Hope this will help someone and save him/her a lot of time and 
>> headache :)
>>
>> So I went into my servers.php file and changed
>>
>> 'protocol' => 'imap',
>>
>> to
>>
>> 'protocol' => 'imap/notls',
>>
>> and I was able to login to my server via port 143.
>>
>> Now I just need to find the right spot to update IMP v2.2.
>>
>> Mike
>>
>> Mike Baptiste wrote:
>>
>>> And one more thing that I just realized - I'm getting an SSL error 
>>> from IMP 2.2.x which doesn't even support SSL.  does --with-imap-ssl 
>>> force PHP to always use SSL IMAP, even if you say port 143?  My 3.0 
>>> installation is configured for self-signed SSL imap connections, but 
>>> it doesn't make any sense why 2.2./x is failing to login.
>>>
>>> Mike
>>>
>>> Mike Baptiste wrote:
>>>
>>>> I forgot to mention that this happens with both 2.2.x and 3.0  With 
>>>> 2.2.x I only get host=UNKNOWN, with 3.0 I get the user=??? as well
>>>>
>>>> Normal imap logins with and without SSL from mail clients are 
>>>> working fine.  I even updated my imapd and c-client to 2001a and 
>>>> recompiled php - no luck - IMP still dies.  I thought maybe using 
>>>> 'localhost' as the server settings might make a difference, nope - I 
>>>> used the raw IP and it still didn't like it.  Is the SSL libary 
>>>> trying to do a reverse lookup on the IP?  Is this a new check in PHP 
>>>> 4.1.2?
>>>>
>>>> Mike
>>>>
>>>
>>>
>>
>>
>>
> 
> 
> 


-- 
Robert Sand.
mailto:rsand@d.umn.edu
University of Minnesota, Duluth
Information Technology Systems and Services
144 MWAH
218-726-6122        fax 218-726-7674

"Walk behind me I may not lead, Walk in front of me I may not follow,
  Walk beside me and we walk together"  UTE Tribal proverb.