From: [EMAIL PROTECTED] Operating system: Solaris 2.7 PHP version: 4.1.1 PHP Bug Type: IMAP related Bug description: imap_headers() does not work
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 [EMAIL PROTECTED] Subject1 (447 chars) U 2) 3-Feb-2002 [EMAIL PROTECTED] Subject2 (455 chars) U 3) 3-Feb-2002 [EMAIL PROTECTED] 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 -- Edit bug report at http://bugs.php.net/?id=15470&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15470&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15470&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15470&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15470&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15470&r=support Expected behavior: http://bugs.php.net/fix.php?id=15470&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15470&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15470&r=submittedtwice -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php