ID: 9488
Updated by: sniper
Old-Status: Open
Status: Closed
Bug Type: IMAP related
Assigned To: 

Change the '||' to 'or'  and it should work ok.


Previous Comments:

[2001-02-27 17:09:01] [EMAIL PROTECTED]
This problem is similar to that I submitted in bug # 7816,
however it expands on it.  

It appears that the imap_open function fails silently if you
have used any other socket-type function previously in the
script.  Specifically I have seen this with calls to
fsockopen, and also the mysql_connect functions.  In a
script that I have written I was trying to athenticate the
user before calling the imap_open function, because the
imap_open function takes so long to fail when given an
incorrect username-password pair.  Origanally I was trying
to authenticate to a mysql radius database for
authentication, however when the imap function refused to
work with mysql_connect called prior to it, I tried using
fsockopen to connect to the pop3 port on the server so that
I could manually attemp authentication.  However this
produced the same results as the mysql attempt.  

Specifically I am calling a function for imap_open in the
following manner...

$mbox = imap_open("{my.mail.server:143}" . $mailbox,
$username, $password)  || die ("can't connect: " .

This works fine unless I have call fsockopen or
mysql_connect before this.  If you use either of those
functions prior to this statement in the php script however
the imap_open function appears to succeed and a value is
assigned to $mbox, however subsequent calls to imap
functions attempting to use the "imap stream" stored in
$mbox will fail with an error stating that $mbox is not a
valid imap stream.


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to