php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10851 COM component crashes when calling a property
Submitted: 2001-05-14 10:13 UTC Modified: 2001-06-02 21:21 UTC
From: samuel at liones dot nl Assigned:
Status: Closed Package: COM related
PHP Version: 4.0.6-dev OS: Windows 2000
Private report: No CVE-ID: None
 [2001-05-14 10:13 UTC] samuel at liones dot nl
PHP 4.0.5 CGI and ISAPI crashes when I do the following:
<?php
	
	$savefile 		= dirname(__FILE__) . "/tbxds-data.xml";
	$requestfile 	= dirname(__FILE__) . "/tbxds-request.xml";
   $tbxdslocation = "http://services.eurobench.nl/tbxds/tbxds.asp";

   $xmlhttp = new COM("Microsoft.XMLHTTP");
 
 	if ( $requestdata = join('',file($requestfile)) ) {
 	     $xmlhttp->open("POST", $tbxdslocation, 0);
        $xmlhttp->send($requestdata);
        $reqdoc = $xmlhttp->responseXML;
      //  $reqdoc->save($savefile);
        
        // proceed with further processing
        include("nutreco.php");
        
	} else {
        print "Er is een fout opgetreden tijdens het lezen van het request-bestand.<br>";
        print $objdoc->parseError->reason;
   }
?>
It crashes at line 12: $reqdoc = $xmlhttp->responseXML;

Is the COM component faulty?
   

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-14 10:25 UTC] derick@php.net
This should be fixed in CVS, can you please try the binary
that php4win.de provides (site is down, but there is a link to the binary).

If this one doesn't fix the problem, please reopen this report.

Derick
 [2001-05-14 11:41 UTC] samuel at liones dot nl
Still crashes with new 4.0.6-dev binary from php4win
 [2001-05-14 14:01 UTC] phanto@php.net
could you provide a short script without any includes that reproduces that error. i've done a few tests with XMLHTTP but i haven't got any errors with the latest cvs version.
 [2001-05-14 14:02 UTC] phanto@php.net
could you provide a short script without any includes that reproduces that error. i've done a few tests with XMLHTTP but i haven't got any errors with the latest cvs version.
 [2001-05-14 14:13 UTC] derick@php.net
status: feedback
 [2001-05-15 03:52 UTC] samuel at liones dot nl
This is a small script that should generate a file called tbxds-data.xml . Don't mind what is in the file. It crashes at line 23: $xml = $xmlhttp->responseXML;

With PHP 4.0.4pl1 it works fine, but with 4.0.5 and 4.0.6-dev it crashes. I've tested this a number of times, so it thinks the new COM component is buggy.

<?php
	
	$savefile 		= dirname(__FILE__) . "/tbxds-data.xml";
   $tbxdslocation = "http://services.eurobench.nl/tbxds/tbxds.asp";

   $xmlhttp = new COM("Microsoft.XMLHTTP");
 
 	$requestdata = '<?xml version="1.0" standalone="yes"?>
							<TBMDataRequest version="2.0" user-name="NUTRECO">
							
							   <Quotes>
							      <Quote ticker="NUO"  exchange="AEX"/>
							   </Quotes>
							   
							   <Charts type="67,68,69">
							      <Chart ticker="NUO"  exchange="AEX"/>
							   </Charts>
							   
							</TBMDataRequest>';

	$xmlhttp->open("POST", $tbxdslocation, 0);
	$xmlhttp->send($requestdata);
	$xml = $xmlhttp->responseXML;
	$xml->Save($savefile);
	
	print "$savefile saved, done";
?>

 [2001-05-15 14:42 UTC] phanto@php.net
it seems that there's something wrong inside php, because the same script translated to another language works.
the proplem is that the execution fails during a method call
of the com component (so outside of php). maybe it assumes a preallocated memory area that i don't provide, i'll investigate this ..
 [2001-06-02 21:21 UTC] phanto@php.net
seems to work now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC