php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8424 imap_status
Submitted: 2000-12-26 11:40 UTC Modified: 2001-01-07 02:49 UTC
From: katz at advanced dot org Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.0.4 OS: Linux
Private report: No CVE-ID: None
 [2000-12-26 11:40 UTC] katz at advanced dot org
The 'imap_status' function seems to not be working anymore.  An strace of a run using imap commands shows imap_open properly opening the connection and logging in.. other imap commands running fine, but when imap_status runs it tries to log into the mailbox with incorrect parameters, using {\d}, (ie, {4}, {5}, etc...) in place of things like the mailbox name, userid, password, etc...  The result is multiple "login incorrect" messages as it tries a few times to log in..  The command worked fine in 4.0.3 (all code with the command stopped working in 4.0.4)..

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-02 10:08 UTC] sniper@php.net
Please add a short as possible script into this report
which can be used to reproduce this possible bug.

--Jani
 [2001-01-02 12:53 UTC] katz at advanced dot org
$server = "<server>:143";
$login = "<login>";
$password = "<password>";
$im = imap_open("\{$server}",$login,$password);
$stat1 = (int)imap_ping($im);
$stat2 = (int)imap_status($im,"\{$server}INBOX",SA_ALL);
$stat3 = (int)imap_ping(im);
$stat4 = (int)imap_status($im,"\{$server}INBOX",SA_ALL);
$stat5 = (int)imap_mailboxmsginfo($im);

print "Info: $im,$stat1,$stat2,$stat3,$stat4,$stat5\n";

......

under PHP 4.0.3pl1 the previous would give:
  Info: 1,1,1,1,1,1
under PHP 4.0.4 it gives:
  Info: 1,1,0,1,0,1

(I cast everything to ints just to see if the functions were working .. without them the 0's came up as nulls and 1's for status/mailboxmsginfo came up as 'Object's..)

So..
  opening the server connection works
  pinging the connection works
  imap_status failes under 4.0.4
  imap_mailboxmsginfo works

For now i'm just using the mailboxmsginfo after running a bunch of re-opens to change the current mailbox for checking the status .. I would prefer the cleaner imap_status though :)



 [2001-01-07 02:49 UTC] sniper@php.net
Fixed in CVS.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 19:01:31 2024 UTC