Menu

#2 Invalid string passed to imap_open

open
nobody
5
2006-08-09
2006-08-09
Anonymous
No

When connecting to the IMAP server, an invalid mailbox
string is created, and passed to imap_open.

This bug generates the following warning, and login fails:
Warning: imap_open() [function.imap-open]: Couldn't
open stream \{localhost:143/imap/notls/norsh}INBOX in
/var/www/secure/webmail/www/list.php on line 54

A potential fix for the problem is to rewrite the
mailbox string to this:
$Mailbox =
'{'.$IMAPHostname.":".$IMAPPort.$IMAPFlags.'}INBOX';

The bug was found on Gentoo Linux, Apache 2.0.58,
PHP-5.1.4, and Courier IMAP 3.0.7.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.