[dev] IMAP problem on IMP

Alfonso Marí­n Marí­n almarin at um.es
Mon Dec 3 17:45:29 UTC 2007


Chuck Hagenbuch escribió:
> Quoting Alfonso Marí­n Marí­n <almarin at um.es>:
>
>   
>> I've got a problem trying to connect my IMP installation with a IMAP
>> server. After digg a bit on the code, i found the reason. A imap_open
>> call gave me this error:
>> *  Warning*: Wrong parameter count for imap_open() in
>> */var/www/consigna/correo/lib/IMAP.php* on line *138
>>
>> *My PHP version is 5.2.1, and in that line exists a exception:
>>
>>         if (version_compare(PHP_VERSION, '5.2.1') != -1) {
>>             $ret = imap_open(IMP::serverString($mbox), $this->_user,
>> $this->_pass, $imap_flags, $_SESSION['imp']['login_tries']);
>>         } else {
>>           ...
>>
>> If I remove the last $_SESSION parameter everithing work fine. ¿Why do
>> you use that parameter in PHP 5.2.1?
>>     
>
> We *don't* use the parameter in 5.2.1.
>   
Sorry, but i think you do. My PHP_VERSION is 5.2.1, and version_compare 
return 0, so the routine enters on the first use of imap_open, where you 
use $_SESSION[...] as last paramether.
> Are you using a packaged version of PHP that might have been patched  
> so that it doesn't match its version?
>   
I really don't know. I'm using the 5.2.1-0ubuntu1.5, that comes with 
Ubuntu 7.04 - Feisty Fawn
> -chuck
>
>   
Thanks a lot
Alfonso.



More information about the dev mailing list