ID: 35389 Comment by: jbr at yaright dot com Reported By: bke15 at gmx dot de Status: Assigned Bug Type: COM related Operating System: Windows 2003 PHP Version: 5.1.0 Assigned To: wez New Comment:
HI PHP 5.1.0 ISAPI AND CGI I have tried to get COM via PHP 5.1.0 to work on IIS, Apache and Sambar. Trying to use even (try, catch) no matter what simple object is called will result in... PHP has encountered an Access Violation at 0140AC0D This works in... PHP 5.0.*, and snaps 5.1.x-dev before Nov 19, 2005 snaps. <? $url = 'http://www.php.com/'; $obj = new COM ( 'InternetExplorer.Application' ); if ( is_object ( $obj ) ) { $ifn = parse_url ( $url ); $obj->Visible = false; $obj->FullScreen = true; $obj->Width = 800; $obj->Navigate ( $url ); while ( $obj->ReadyState != '4' ) usleep ( 10000 ); echo $obj->Document->body->scrollHeight; $obj->Quit (); $obj = null; } ?> The result should print the (document body scroll height in pixels) At least in PHP 5.0.4, COM was working ok, sure there were still problems with variants and references to variants, but at least COM was working, now nothing. I tried the latest (5.1.dev - Nov 26, 2005 11:30 GMT and it still does not work, same problem) Previous Comments: ------------------------------------------------------------------------ [2005-11-25 14:04:51] bke15 at gmx dot de I have no errors in the ErrorLog nor in the eventlog. ------------------------------------------------------------------------ [2005-11-25 13:21:32] [EMAIL PROTECTED] Btw, check the event viewer or whatever it's called to see if there are any error log entries. ------------------------------------------------------------------------ [2005-11-25 13:18:35] bke15 at gmx dot de SysInformation: I am using IIS with ISAPI Extension. Windows is running with latest servicepack and patches. ------------------------------------------------------------------------ [2005-11-25 12:38:52] [EMAIL PROTECTED] Assigned to the maintainer. ------------------------------------------------------------------------ [2005-11-25 12:36:40] bke15 at gmx dot de Description: ------------ Hi I am using COM since 5.0.5 without problems. Since 5.1RC6 and now 5.1.0 COM does stop the complete script. I get no output anymore. see code ... Reproduce code: --------------- <?php echo "Start Test " . date("F j, Y, g:i:s a") . "<br>"; try { $dom = new COM ( "MSXML2.DOMDocument.4.0" ); $dom->setProperty("AllowDocumentFunction",true); $dom->setProperty("NewParser",true); $dom->setProperty("MaxXMLSize",0); $dom->Async = false; $dom->validateOnParse = false; $dom->resolveExternals = true; $dom->preserveWhiteSpace = false; } catch (Exception $e) { die("Error during DOM create.<br>"); } $xml = "<wood> <tree><num>1</num></tree> <tree><num>2</num></tree> <tree><num>3</num></tree> <tree><num>4</num></tree> </wood>"; echo "loading...<br>"; try { $dom->LoadXML($xml); } catch (Exception $e) { echo "ERROR: can't parse Parameter-XML<br>"; echo "ERROR: Reason " . $dom->ParseError->Reason . "<br>"; echo "ERROR: Absolute File Position " . $dom->ParseError->Filepos . "<br>"; echo "ERROR: Line number " . $dom->ParseError->Line . "<br>"; echo "ERROR: Character Position " . $dom->ParseError->linepos . "<br>"; echo "ERROR: SRC Line: " . HTMLEncode ($dom->ParseError->srcText) . "<br>"; unset($dom); die(); } echo htmlentities($dom->xml); echo "<br>finish<br>"; /* Expected Output : Start Test November 25, 2005, 12:26:26 pm loading... <wood> <tree><num>1</num></tree> <tree><num>2</num></tree> <tree><num>3</num></tree> <tree><num>4</num></tree> </wood> finish ?> Expected result: ---------------- Start Test November 25, 2005, 12:26:26 pm loading... <wood> <tree><num>1</num></tree> <tree><num>2</num></tree> <tree><num>3</num></tree> <tree><num>4</num></tree> </wood> finish Actual result: -------------- Blank Page ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35389&edit=1