ID: 31493 User updated by: csaba at alum dot mit dot edu Reported By: csaba at alum dot mit dot edu Status: Bogus Bug Type: COM related Operating System: Win XP Pro PHP Version: 5.0.3 New Comment:
I could only report an observed behaviour. Whether or not the problem lay with PHP is something I couldn't answer. But since entering the 'uri' manually worked, it was reasonable to report. For the record, here is the workaround I have found. You should add a single line, to navigate to about:blank before navigating to a javascript:protocol. The following will not crash IE: <?php $ie = new COM("InternetExplorer.Application"); $ie->Navigate("about:blank"); $ie->Visible = true; $nav = "javascript:alert('hi mom');"; $ie->Navigate($nav); ?> Previous Comments: ------------------------------------------------------------------------ [2005-03-20 23:14:17] [EMAIL PROTECTED] If IE crashes / doesn't do something, how is it PHP bug? Bogus. ------------------------------------------------------------------------ [2005-03-18 23:30:06] csaba at alum dot mit dot edu <?php $ie = new COM("InternetExplorer.Application"); $ie->Visible = true; $nav = "javascript:alert('hi mom');"; $ie->Navigate($nav); ?> Fair enough. I mean in the code above IE will vanish and not put up the alert. If, on the other hand, you put the following line into IE's address bar, IE will put up the expected alert and not vanish: javascript:alert('hi mom'); ------------------------------------------------------------------------ [2005-03-18 19:49:02] [EMAIL PROTECTED] And with 'original scenario' you mean what? The first example script in this report? (with the sleep() call?) Or what? ------------------------------------------------------------------------ [2005-03-10 00:59:46] csaba at alum dot mit dot edu Sorry to reopen this, but I wanted to ensure that this got attention. I'm not objecting to it being closed, per se, but I don't think it makes sense to do so without a comment considering that the penultimate comment says, "Is it working", and the response is "No." Anybody looking at this in the future (and me looking at it now) is going to wonder what went on. It would be good to know whether this is not considered a bug (or is of the 'not our problem' variety), is a Won't fix situation, or possibly confused with bug 31492 (since that seems to have already happened once, but that bug is distinct), or what? But in my most recent testing, the original scenario still failed. Csaba ------------------------------------------------------------------------ [2005-03-09 01:40:57] csaba at alum dot mit dot edu I have tried this with the March 7 build and it is still not working in the same fashion, but I have a bit more information on it. It is tied to the fact that there is no previous navigation before the javascript:whatever is hit. For example, <?php $ie = new COM("InternetExplorer.Application"); //$nav = "javascript:'<body>Hi Mom</body>'"; $nav = "javascript:alert('Hi Mom')"; $ie->Visible = true; $ie->Navigate($nav); ?> will vanish IE, but <?php $ie = new COM("InternetExplorer.Application"); //$nav = "javascript:'<body>Hi Mom</body>'"; $nav = "javascript:alert('Hi Mom')"; $ie->Visible = true; $ie->Navigate("about:blank"); $ie->Navigate($nav); ?> will keep IE around (you can also use the non alert version). The point is that the 'pre navigation' to "about:blank" allows the main navigation to go through somehow. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31493 -- Edit this bug report at http://bugs.php.net/?id=31493&edit=1