|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45313 imap_header() is crashing with Segmentation fault
Submitted: 2008-06-19 09:46 UTC Modified: 2008-06-27 01:00 UTC
From: toto at lativio dot com Assigned:
Status: No Feedback Package: IMAP related
PHP Version: 5.2CVS-2008-06-19 (snap) OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-06-19 09:46 UTC] toto at lativio dot com
When I'm using the imap_header() function to parse an email account emails very often the script is crashing with "Segmentation fault".
I saw this in the PHP bugs, but they all was old and for the oldest PHP versions. Now I have this bug again.

Reproduce code:
$check = imap_check($mailbox);
    $header = imap_headerinfo($mailbox,$i);
    echo date("Y-m-d",$header->udate)."\n";

Expected result:
I expect to see the dates of the all emails.

Actual result:
When I execute the code it began to parse the emails. After few emails the script hangs for round a minute (or less) and then I receive the last print_r() results and then Segmentation fault.
The above URL is what the print_r() returns.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-19 10:25 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Would be nice to have a backtrace and the mails data if possible.
 [2008-06-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2014-06-13 08:12 UTC]
Automatic comment from SVN on behalf of salathe
Log: Use object in OO example

Patch by anonymous #45313
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Mar 07 05:01:23 2021 UTC