From: toto at lativio dot com
Operating system: Linux
PHP version: 5.2CVS-2008-06-19 (snap)
PHP Bug Type: IMAP related
Bug description: imap_header() is crashing with Segmentation fault
Description:
------------
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:
---------------
$mailbox=imap_open("{mail.myhost.com:110/pop3}INBOX","support","****");
$check = imap_check($mailbox);
$messages=$check->Nmsgs;
for($i=1;$i<=$messages;$i++)
{
$header = imap_headerinfo($mailbox,$i);
print_r($header);
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.
http://www.toshko-bg.com/toto/bad_email.html
--
Edit bug report at http://bugs.php.net/?id=45313&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45313&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45313&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45313&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45313&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45313&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45313&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45313&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45313&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45313&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45313&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45313&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45313&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45313&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45313&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45313&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45313&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45313&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45313&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45313&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45313&r=mysqlcfg