#23741 [NEW]: Problems using msxml via COM interface

From: Date: Wed, 21 May 2003 16:26:27 +0000
Subject: #23741 [NEW]: Problems using msxml via COM interface
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40142@lists.php.net to get a copy of this message
From: jbelant at wpsenergy dot com Operating system: Windows 2000 PHP version: 4.3.2RC3 PHP Bug Type: XML related Bug description: Problems using msxml via COM interface Hello I am running Windows 2000 SP3, Apache 2.0.45, and PHP 4.3.2RC3. When I try to use the getAttribute method of MSXML, I get the following error message: Warning: (null)(): Invoke() failed: Exception occurred. Source: Unavailable Description: Unavailable in C:\Apache2\htdocs\get_xml.php on line 198 Line 198 is where the getAttribute is called. However, this code works perfectly with PHP4.3.2RC1. Following is a snippet of the php code: ---------start code---------- #create a new ModbusTCP object $MBObj = new ModbusTcp; #define the path to the web server files $serverpath = "c:\\Apache2\\htdocs\\"; #define the path to point data $XMLPath = "ModbusTCP/Points/Point"; #get the file name $xsltfilename = $filename; if ($xmltrue) { $xmlfile = $filename; } else { #load the xslt file into an array $xsltfile = file($serverpath.$xsltfilename); #get the xml file name $xmlfile = $xsltfile[0]; #get the xsl file name $xslfile = $xsltfile[1]; $xsl = new COM("Msxml2.DOMDocument"); $xsl->async = false; $xsl->load($serverpath.$xslfile); } $xml = new COM("Msxml2.DOMDocument"); $xml->async = false; $xml->load($serverpath.$xmlfile); $nodes = $xml->getElementsByTagName("ModbusTCP/IP"); $node = $nodes->item(0); $ip = $node->text; $nodes = $xml->getElementsByTagName("ModbusTCP/UnitID"); $node = $nodes->item(0); $id = $node->text; $nodes = $xml->getElementsByTagName("ModbusTCP/NumRegisters"); $node = $nodes->item(0); $NumReg = $node->text; $nodes = $xml->getElementsByTagName("ModbusTCP/StartAddr"); $node = $nodes->item(0); $Offset = $node->getAttribute("Offset"); -------end code----------- Any ideas on what could be causing this? Jim -- Edit bug report at http://bugs.php.net/?id=23741&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23741&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23741&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23741&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23741&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23741&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23741&r=support Expected behavior: http://bugs.php.net/fix.php?id=23741&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23741&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23741&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23741&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23741&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23741&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23741&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23741&r=gnused

« previous php.bugs (#40142) next »