php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21170 imap_sort seems to crash when reading mail messages with many recipients
Submitted: 2002-12-23 21:39 UTC Modified: 2002-12-28 04:01 UTC
From: leonardo at pcnet dot ro Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.4.0 OS: Windows 2000 Advanced Server
Private report: No CVE-ID: None
 [2002-12-23 21:39 UTC] leonardo at pcnet dot ro
I build an webmail interface for a Courier IMAP mail server on RedHat 7.3 Linux.
There are some users which have mail messages containing very many recipients in the To or CC or BCC headers and when the PHP script get to the line imap_sort function the browser displays invariable "The page cannot be displayed".
I tried to determine a maximum limit number of recipients on which the PHP script works fine and I've noticed a limit of 170 recipents in one header (To or CC or BCC).
I also tried to find a error record in the php error log but I haven't found a thing.

The line that I use is:

$messages = imap_sort($mailbox, $imap_sort_criteria, $imap_sort_order, SE_NOPREFETCH);

Thank you for your time.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-23 21:43 UTC] leonardo at pcnet dot ro
1. I mention that my PHP webmail interface is on a server running Apache 2.0.36 on Windows 2000 Advanced server.

2. I presumed that the script may break at line with the imap_sort function because this is the first line that attempts to access the messages on the mail server but it may break wherever at the lines where I loop through the results with imap_headerinfo.
 [2002-12-24 01:03 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-12-25 19:33 UTC] leonardo at pcnet dot ro
I've just installed the version you told me about (4.4.0) and I just made up a mail message with over 360 recipients in my mailbox and the php script keep doing like that: it is loading for 1-2 minutes and then the browser tells me "The page cannot be displayed"
 [2002-12-26 10:46 UTC] kalowsky@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Sounds like PHP hit the maximum execution time.
 [2002-12-28 04:01 UTC] leonardo at pcnet dot ro
There seems the problem solved with the PHP 4.4.0 version still from time to time, I say 1 from 10 impressions, the browser displays "The page cannot be displayed" when reading an e-mail message with over 200 recipients, though I never found an error in the PHP error log or the Apache error log.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 07:01:33 2024 UTC