php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22218 COM function causes PHP crash
Submitted: 2003-02-14 00:31 UTC Modified: 2003-02-20 05:34 UTC
From: reedc at aap dot com dot au Assigned:
Status: Closed Package: COM related
PHP Version: 4.3.0 OS: Windows 2000
Private report: No CVE-ID: None
 [2003-02-14 00:31 UTC] reedc at aap dot com dot au
I have installed PHP 4.3.0 (as a CGI module) and Apache 2.0.43 in a Windows 2000 machine. I am updating code that works on an earlier install and I am able to get most things working.

However, I get a php crash ("php.exe has generated errors and will be closed by Windows") when I run scripts that use COM do MSXML validations of an XML document against a schema.

The code works on previous PHP versions set up similarly, but not on this version.

My code looks like this:

$validate = new COM("Msxml2.DOMDocument.4.0"); 
$validate->async = "false"; 
$validate->validateOnParse = "true";
$validate->load($xmldeliveryfile);
$code = $validate->parseError->errorCode;
$reason = $validate->parseError->reason;	

It seems to be returning correct values for the error code and reason before the PHP crash, but then everything goes south. And it seems to be crashing earlier in the process if I deliberately create an XML validation error.

And, yes, I do have MSXML4 installed.

Any ideas?

Thanks


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-14 00:36 UTC] reedc at aap dot com dot au
One more bit of information... I found this in the event log:
The exception generated was c0000005 at address 10030727 (php_COM_release)
 [2003-02-14 16:27 UTC] phanto@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

there were sooo many reports regarding this, did you ever consider reading the bugreports before filing your own ?
 [2003-02-17 23:09 UTC] reedc at aap dot com dot au
COM functions continue to create an error that crashes php.exe. I have downloaded the latest from CVS, but the problem persists.
 [2003-02-17 23:21 UTC] sniper@php.net
Are you sure you updated all the files?
Especially php4ts.dll file? And that you don't 
have duplicates of the dlls anywhere?

And which snapshot did you get?

 [2003-02-18 04:18 UTC] lim at liones dot nl
Same problem here with PHP 4.3.0

I've used the following code

$fso = new COM('Scripting.FileSystemObject');

and it crashes my script.
My browser receives some data but no ending.
 [2003-02-19 18:14 UTC] reedc at aap dot com dot au
I am using the latest STABLE release and the problem persists. When I install the latest CVS release (5x), I get a PHP crash immediately.
 [2003-02-20 05:34 UTC] phanto@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC