imap_open returns 1 instead of stream pointer
| From: | Mark Hedges | Date: | Fri, 10 Nov 2000 23:29:50 +0000 |
| Subject: | imap_open returns 1 instead of stream pointer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24742@lists.php.net to get a copy of this message | ||
I'm trying to use these dandy imap functions in PHP to check popmail,
and I keep getting a 1 returned from imap_open instead of an integer
that represents a stream pointer.
error:
alerts:
gettype: integer
mbox_stream value: 1
Warning: Unable to find stream pointer in
/usr/local/apache/data/admin/ima_ticket_manager.php on line 941
Warning: Unable to find stream pointer in
/usr/local/apache/data/admin/ima_ticket_manager.php on line 943
This is my code:
$mbox_stream = imap_open("{mail.imedia.net/pop3:110}",
"username", "password")
|| die("cannot read mail: ".imap_last_error());
# "username" and "password" are strings that do work when I
# telnet to port 110 from the same machine as the web server.
print "error: ".imap_last_error()."<BR>\n";
print "alerts: ".imap_alerts()."<BR>\n";
print "gettype: ".gettype($mbox_stream)."<BR>\n";
if (imap_errors()) { echo implode("<br>", imap_errors()); }
if (!$mbox_stream) { print "lame: ".imap_last_error()."<BR>\n"; }
print "mbox_stream value: ".$mbox_stream."<BR>\n";
$num_msg = imap_num_msg($mbox_stream); # line 941
while (imap_num_msg($mbox_stream) > 0) { ......
Has anyone run into this before? I just built apache1.3.14 with
php4.0.3pl1 using the imap-2000 c-client files. All that went fine with
no errors.
Thanks for any advice you can send me.
--mark--
=hedges=
|iMedia|