php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18111 imap_sort hangs with large mailboxes
Submitted: 2002-07-02 10:56 UTC Modified: 2002-07-03 08:44 UTC
From: jonathan at tricolon dot com Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.2.0 OS: Red Hat Linux 7.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jonathan at tricolon dot com
New email:
PHP Version: OS:

 

 [2002-07-02 10:56 UTC] jonathan at tricolon dot com
Hello, 

I am experiencing the same problems as in bugreport numbers 11336 and 11603, that is the imap_sort function 'hangs' when connected to a large mailbox, say 35 megabyte. On smaller mailboxen, however the function works fine. AFAIK I am using the latest C-Client (phpinfo() shows: IMAP c-Client Version 4.1 ) and php version 4.2.0. For more info take a look at https://secure.tricolon.com/phpinfo.php.

The code looks like this:

$sort = imap_sort($stream,1,0);

If I use the code below all works well:

$sort 	= Array();
$nrmsg 	= imap_num_msg($stream);
for ($t = 0; $t < $nrmsg; $t++)
{
 $sort[$t] = $nrmsg-$t;
}	

Please advice what to do!

Thanks,
Jonathan

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-02 11:20 UTC] sniper@php.net
How did you install the c-client? The version information
in phpinfo() is not very accurate but should show 2001 if
you have the latest release of it.

And you should also try this snapshot which has some improvements for imap code:

http://snaps.php.net/php4-latest.tar.gz
 [2002-07-02 11:20 UTC] sniper@php.net
reclassified, it's not crashing.
 [2002-07-03 08:42 UTC] jonathan at tricolon dot com
Not a PHP problem, but the C-Client problem. After some debugging I saw that the problem was that  the C-Client uses RETR to fetch the headers of a message, and this is also affecting the imap_sort function (like reported in other bug reports).

Sorry to bother you and thank you!

Jonathan
 [2002-07-03 08:44 UTC] derick@php.net
Not PHP -> bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 14:01:29 2024 UTC