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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 23 06:01:30 2024 UTC