PHP 4.0 Bug #9488 Updated: Imap connection silently fails.
| From: | sniper@php.net | Date: | Tue, 27 Feb 2001 22:27:44 +0000 |
| Subject: | PHP 4.0 Bug #9488 Updated: Imap connection silently fails. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47645@lists.php.net to get a copy of this message | ||
ID: 9488
Updated by: sniper
Reported By: jlhaase@iland.net
Old-Status: Open
Status: Closed
Bug Type: IMAP related
Assigned To:
Comments:
Change the '||' to 'or' and it should work ok.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-02-27 17:09:01] jlhaase@iland.net
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: " .
imap_last_error());
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 http://bugs.php.net/?id=9488&edit=2