|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-22 11:02 UTC] jbelant at wpsenergy dot com
[2003-07-24 22:11 UTC] iliaa@php.net
[2003-07-25 07:47 UTC] jbelant at wpsenergy dot com
[2003-08-17 15:23 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 17:00:01 2025 UTC |
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