php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16038 COM Object: Works fine with PHP 4.0.6, causes Access Violation with 4.1.1
Submitted: 2002-03-13 06:35 UTC Modified: 2002-03-15 12:35 UTC
From: lightwing at bluewin dot ch Assigned:
Status: Closed Package: COM related
PHP Version: 4.1.1 OS: Windows NT 4.0 Server
Private report: No CVE-ID: None
 [2002-03-13 06:35 UTC] lightwing at bluewin dot ch
I wrote a very simple ActiveX Library with Delphi 5, containing an Automation Object with just a few functions. Calling this object from Delphi, ASP or PHP 4.0.6 worked fine, but from PHP 4.1.1 did not.

$myObj = new COM(...); or $myObj = com_load(...); worked and returned an object (at least echo $myObj; said so) and $myObj = null destroyed it, but whenever I called any object function (whether by $myObj->...; or com_invoke(...) did not matter), I got an Access Violation.

I tried lots of different versions with functions actually doing nothing at all and with different kinds of parameters or none, the result was always the same. Also, the problem occurred on both Apache and IIS, and with the Library written under Delphi as well as under Visual C++.

Only when replacing PHP 4.1.1 by older 4.0.6 (I did not replace php.ini), it suddenly worked as expected.

Personally, I am satisfied now. But for others who might spend a lot of time and nerves as I did, i thought it worth dropping this note

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-15 12:35 UTC] phanto@php.net
this sometimes happens to me when i have a corrupt build. download your copy from another source and try it again.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 15:01:32 2024 UTC