#21172 [Com]: PHP crashed when try to access XML DOM COM interfaces
| From: | vodmal at newmail dot ru | Date: | Thu, 26 Dec 2002 07:57:50 +0000 |
| Subject: | #21172 [Com]: PHP crashed when try to access XML DOM COM interfaces | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-28375@lists.php.net to get a copy of this message | ||
ID: 21172
Comment by: vodmal@newmail.ru
Reported By: vodmal@newmail.ru
Status: Feedback
Bug Type: COM related
Operating System: Windows 2000
PHP Version: 4.2.1
New Comment:
Latest PHP build don't solve this porblem :-\
I am use PHP for Win32 as CGI, may be this information can help fix
this problem.
DOM XML -> Microsoft XML Parser 4.? (latest)
Previous Comments:
------------------------------------------------------------------------
[2002-12-24 17:52:54] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-12-24 07:55:40] vodmal@newmail.ru
test.xml:
<?xml version="1.0"?>
<test a="g" b="false">
<v val="1">aa</v>
<v val="2">bb</v>
<v val="3">nn</v>
</test>
test.php:
<?
$MSXML = new COM("Msxml2.DOMDocument");
if ($MSXML->load("D:\\Inetpub\\wwwroot\\vphpmail\\test.xml"))
{
$nodeList = $MSXML->getElementsByTagName("v");
for ($i=0;$i<$nodeList->length;$i++)
{
$node = $nodeList->nextNode();
$attribs = $node->attributes;
$attr = $attribs->getNamedItem("val");
echo($attr->Name."<BR>"); // This is crash
echo($node->nodeName." ".$node->xml."<BR>");
}
}
else
{
echo("BAD<br>");
echo(
"Error in file <b>".$MSXML->parseError->url."</B> at line
<b>".
$MSXML->parseError->line."</b> in pos
<b>".$MSXML->parseError->linepos."</b>");
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21172&edit=1