|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22768 memory could not be read error when invoking a Microsft COM object
Submitted: 2003-03-18 08:44 UTC Modified: 2003-03-20 04:43 UTC
From: xtian_news at hotmail dot com Assigned:
Status: Not a bug Package: COM related
PHP Version: 4.3.1 OS: Windows 2000 Server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: xtian_news at hotmail dot com
New email:
PHP Version: OS:


 [2003-03-18 08:44 UTC] xtian_news at hotmail dot com
* I build a simple COM Object in Visual Basic 6 : its an "Active X DLL" project.
Name of the compound : CheckYear
Name of the object : LeapYear

The only one method of the object :
Public Function IsLeapYear(yr As Variant) As Boolean
    'If year is divisible by 4 and not divisible by 100, or
    'It is divisible by 400, it is a leap year
    If (yr Mod 4 = 0 And yr Mod 100 <> 0) Or yr Mod 400 = 0 Then
        IsLeapYear = True
        IsLeapYear = False
    End If
End Function

* I compile the VB6 project and obtain : Leapyear.dll

* I register this COM object in my windows 2000 server : regsvr32.exe Leapyear.dll

* I write the following php script : try.php
  print "Hi\n";
  $exapp = new COM("CheckYear.LeapYear");

* I execute :
php -f try.php

* I obtain

And a Windows error popup appears :
php.exe - application error
The instruction at "0x10030729" referenced memory at "0x110022ec".  The memory could not be "read".

Do you know the reason of this error and how to correct it ?




Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-20 04:43 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

that has been submitted a *lot* of times and is fixed for a while. com support in 4.3.0 & 4.3.1 is broken due to the misplaced com initialitation in these versions.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 19:03:38 2023 UTC