ID:               37984
 Updated by:       [EMAIL PROTECTED]
 Reported By:      csaba at alum dot mit dot edu
-Status:           Open
+Status:           Feedback
 Bug Type:         COM related
 Operating System: Win XP Pro
 PHP Version:      5CVS-2006-07-01 (snap)
 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------

[2006-07-01 19:57:31] csaba at alum dot mit dot edu

Description:
------------
Sorry I cannot reliably reproduce this but...

php-win.exe often errors, giving me one of those "would you like to
report this to Microsoft dialogs" on account of the $ox=new
COM("Shell.Application"); line.  This happens in version 5.1.1 (from
about Dec. 2005) and today's 5.2  Note that it only happens:
1. with php-win.exe
2. in the php-win -a form and not the -r form
3. when the Shell.Application line is present
4. when the execScript line is present

The last two lines and the opener="me" line are not required for the
bug to be shown.  They are there so that when you go to the new IE, you
can make it go away by pressing any key.

Also, despite the bug, the new IE appears and the execScript
functionality is present.


// to see the bug, have DOSKEY active, and
// call the file below (named inc.php) a few
// times from a (wrapped) command line with:

// echo ^^^<?php
include('inc.php');ieStuff("<strong>Whoever</strong>"); ?^^^> | php-win
-a

// or

// echo ^^^<?php ieStuff("<strong>Whoever</strong>"); ?^^^> | php-win
-d auto_prepend_file=inc.php -a

Reproduce code:
---------------
<?php
function ieStuff($html) {
  // Without this line, the bug does not happen
  $ox = new COM("Shell.Application");

  // new instance of IE
  $ie = new COM("InternetExplorer.Application");
  // next line creates a DOM
  $ie->Navigate2("about:blank");
  // allow for settling
  while ($ie->ReadyState!=4) usleep(10000);
  $ie->Visible = true;
  // next line allows self.close()
  $ie->Document->ParentWindow->opener="me";

  // escape handler definition
  $ie->document->parentWindow->execScript(
    "document.onkeypress=function(){window.close();}");
  // proof of access to IE
  $ie->document->body->innerHTML = $html;
  // so escape handler listens
  $ie->document->body->focus(); }
?>

Expected result:
----------------
I don't expect to see any CLI error message

Actual result:
--------------
Every so often, sometimes consistently every time, I get a CLI error
dialog box on account of the Shell.Application line, which is not even
used (in the example).

The more windows you have open (IE and otherwise), the more likely the
bug is to show itself.  Under 25 windows open, and it doesn't fail
much.  Also, the problem tends to surface more readily if you go do
your thing and then come back to the Cmd window 10 or 20 minutes later
and then try it again.

Sorry, I can't be more specific.  I'm probably as unhappy reporting on
an intermittent bug as you are reading about it.

Csaba Gabor from Vienna


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37984&edit=1

Reply via email to