php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48713 IMAP extension crashes PHP (internal reference #183257)
Submitted: 2009-06-29 08:27 UTC Modified: 2013-02-18 00:33 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: michael dot l at zend dot com Assigned: pajoye (profile)
Status: No Feedback Package: IMAP related
PHP Version: 5.2.10 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
44 - 23 = ?
Subscribe to this entry?

 
 [2009-06-29 08:27 UTC] michael dot l at zend dot com
Description:
------------
The following code is crashing the PHP engine (php-cli,php-cgi) when working on Linux OS. Also tried via Microsoft FastCGI wrapper and IIS (IIS-6 and IIS-7).

On Linux OS its working ok.

In order to reproduce, create a new Gmail account, login and enable IMAP service, then, use the code below.

Reproduce code:
---------------
<?php


$connectionString ='{imap.gmail.com/imap/ssl/novalidate-cert/user=USER_NAME@gmail.com}INBOX';
$messageStream = imap_open ($connectionString, 'USER_NAME@gmail.com', 'PASSWORD');


$boxInfo = imap_check($messageStream);

for ($messageNumber = 1; $messageNumber <= $boxInfo->Nmsgs; $messageNumber++)
{
    $headerInfo = imap_header($messageStream, $messageNumber);
    var_export($headerInfo);
}

Expected result:
----------------
You should get the list of your emails.

Actual result:
--------------
Crash of PHP/FastCGI.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-29 08:36 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-06-29 17:56 UTC] michael dot l at zend dot com
Small correction to my report:

The code IS working on Linux OS and DOES NOT on Windows OS
 [2009-06-29 19:59 UTC] pajoye@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-07-07 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".
 [2010-08-28 14:44 UTC] avi-phpbugs at dreamingking dot com
This bug is still present in 5.2.14 and 5.3.3 (both VC6 and VC9 builds - TS and NTS).

It looks like any of the calls in this extension when used with SSL (IMAP, POP, or NNTP) result in a crash on Windows - "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

Can someone please help?
 [2010-08-28 14:55 UTC] pajoye@php.net
-Status: No Feedback +Status: Feedback
 [2010-08-28 14:55 UTC] pajoye@php.net
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
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php 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.


 [2010-08-28 15:19 UTC] pajoye@php.net
IIRC, this code works just fine here. Which version do you exactly? From where did you get it, which SAPI, etc.
 [2010-08-28 15:19 UTC] pajoye@php.net
-Package: Reproducible crash +Package: IMAP related
 [2013-02-18 00:33 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC