From:             xtian_news at hotmail dot com
Operating system: Windows 2000 Server
PHP version:      4.3.1
PHP Bug Type:     Reproducible crash
Bug description:  memory could not be read error when invoking a Microsft COM object

* 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
    Else
        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
=========================================================
<pre>
<?php
  print "Hi\n";
  $exapp = new COM("CheckYear.LeapYear");
?>
</pre>
==========================================================

* I execute :
php -f try.php

* I obtain
<pre>
Hi
</pre>

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 ?

Thanks,

Christian 
-- 
Edit bug report at http://bugs.php.net/?id=22768&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22768&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22768&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22768&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22768&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22768&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22768&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22768&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22768&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22768&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22768&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22768&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22768&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22768&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22768&r=gnused

Reply via email to