php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25664 COM objects written in Delphi crash PHP
Submitted: 2003-09-25 19:07 UTC Modified: 2003-11-28 12:12 UTC
From: blomster at algonet dot se Assigned: wez (profile)
Status: Closed Package: COM related
PHP Version: 5CVS OS: win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: blomster at algonet dot se
New email:
PHP Version: OS:

 

 [2003-09-25 19:07 UTC] blomster at algonet dot se
Description:
------------
To me it seems all COM objects written in Delphi 5 crashes PHP - fully reproducible. I don't know about Delphi 6 or 7. These objects work in VBScript, Javascript, Perl, Word/Excel VBA macros, and more.

Applies to PHP 4.3.3 but also to PHP 5 downloaded 24 sept 2003.

An example, which I have not written myself:
http://www.undu.com/Articles/000928g.html

I can compile that source and mail the dll to anybody willing to test. I have more examples, including my own Delphi COM object.

I recognize the description in bug #25586 - this has also happened to me and I believe it's related to what I describe here. That was Delphi 6.

A bizarre workaround was found for my own COM object: If I override Delphi's own GetTypeInfo, and always return HRESULT -1, then PHP continues by calling other methods and does not crash, but then I instead get a memory leak. I have not understood how the crash and the leak are related, if at all.

Thanks for any assistance & best regards
Jens Blomster
Uppsala, Sweden

Reproduce code:
---------------
From the above-mentioned message board COM example:

$instance = new COM("msgboard.MessageBoard");
$i =  $instance->CreateMessage("hej","hopp","i baljan");


Expected result:
----------------
The message created in the COM object, just like it does in VBScript.

Actual result:
--------------
A PHP crash.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-28 09:24 UTC] wez@php.net
I'm lazy and I didn't see where to download your sample delphi COM object.

Could you please email me a .zip of the smallest possible Delphi 5 project + short php script that will reproduce
this crash?
(I have Delphi 5, so just the source code will do).

 [2003-11-28 12:12 UTC] wez@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.

Fixed in both HEAD and the stable branch; the next win32 snapshot build will include the fix.

Thanks for your help.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC