|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-09 19:39 UTC] darek at my dot tenbit dot pl
[2002-02-10 05:57 UTC] sander@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 08:00:02 2025 UTC |
On PHP 4.0.6 this script works fine, but after upgrade to 4.1.1 there is a problem... <? $mbox = imap_open("{my.host.com:143}","user","password") or die("can't connect: ".imap_last_error()); echo "<p><h1>Mailboxes</h1>\n"; $folders = imap_listmailbox ($mbox, "{my.host.com:143}", "*"); if ($folders == false) { echo "Call failed: ".imap_last_error()."<br>\n"; } else { while (list ($key, $val) = each ($folders)) { echo $val."<br>\n"; } } echo "<br>==========INBOX=============<br>"; $status = imap_status($mbox,"{my.host.com:143}INBOX",SA_ALL); if($status) { print("Messages: ". $status->messages )."<br>\n"; print("Recent: ". $status->recent )."<br>\n"; print("Unseen: ". $status->unseen )."<br>\n"; print("UIDnext: ". $status->uidnext )."<br>\n"; print("UIDvalidity:". $status->uidvalidity)."<br>\n"; } else print "imap_status failed: ".imap_last_error()."\n"; echo "<p><h1>Headers in INBOX</h1>\n"; $headers = imap_headers ($mbox); if ($headers == false) { echo "Call failed: ".imap_last_error()."<br>\n"; } else { while (list ($key,$val) = each ($headers)) { echo $val."<br>\n"; } } imap_close($mbox); ?> Result on PHP 4.0.6: Mailboxes {my.host.com:143}DRAFT {my.host.com:143}INBOX {my.host.com:143}SENT ==========INBOX============= Messages: 67 Recent: 0 Unseen: 63 UIDnext: 4227 UIDvalidity:242664002 Headers in INBOX 1) 2-Feb-2002 user@my.host.com Subject1 (447 chars) U 2) 3-Feb-2002 user@my.host.com Subject2 (455 chars) U 3) 3-Feb-2002 user@my.host.com Subject3 (458 chars) ... ... ... Result on PHP 4.1.1: Mailboxes {my.host.com:143}DRAFT {my.host.com:143}INBOX {my.host.com:143}SENT ==========INBOX============= Messages: 67 Recent: 0 Unseen: 63 UIDnext: 4227 UIDvalidity:242664002 Headers in INBOX Call failed: phpinfo(): Configure Command './configure' '--with-oci8=/opt/ORCL/oracle/product/8.1.7' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-sigchild' '--with-imap=../pine4.44/imap' '--with-gd=../gd-1.8.4' '--with-png-dir=../gd-1.8.4' '--with-jpeg-dir=../jpeg-6b' '--with-zlib-dir=../zlib-1.1.3' '--without-mysql' '--disable-wddx' '--disable-xml' '--disable-posix' '--enable-ftp' '--with-recode' IMAP Support enabled IMAP c-Client Version 2001