ID: 23741 User updated by: jbelant at wpsenergy dot com Reported By: jbelant at wpsenergy dot com -Status: Feedback +Status: Open Bug Type: COM related Operating System: Windows 2000 PHP Version: 4.3.2RC4 New Comment:
Thanks for the update. Unfortunately, I'm still seeing the same symptoms. The only version of php that seems to work with the getAttribute of MSXML is 4.3.2RC1. I've start porting the code to use the PHP DOM model, and that seems to work better. Jim Previous Comments: ------------------------------------------------------------------------ [2003-07-24 22:11:03] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-05-22 11:02:28] jbelant at wpsenergy dot com I just tried PHP 4.3.2RC4, and see the same problem ------------------------------------------------------------------------ [2003-05-21 11:26:27] jbelant at wpsenergy dot com 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 this bug report at http://bugs.php.net/?id=23741&edit=1