Possible bug with PHP + GTK + COM on Win32
| From: | Scott Hurring | Date: | Thu, 20 Mar 2003 22:19:52 +0000 |
| Subject: | Possible bug with PHP + GTK + COM on Win32 | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-3130@lists.php.net to get a copy of this message | ||
Hello everyone:
(I've been using PHP for a couple years now but only recently started
using GTK). I'm writing an app for Win32 that will access MS Excel thru
its COM interface, i'm running into some seeming conflicts between GTK
and COM. I'm not sure if this is the best place for this, but please bear
with me...
Software:
PHP version 4.3.0-dev
gtkdev 0.5.1 installer for Win32
Test script code and other notes can be found here:
http://hurring.com/info/php/com_gtk_issues/
Problem:
"EXCEL.EXE" stays resident in memory even after my script exits.
I have a GTK front-end that is accessing MS Excel thru its COM interface,
after the script terminates "EXCEL.EXE" stays resident in memory.
It seems to only stay in memory when 'gtk_php.dll' is loaded.
Why i'm posting this to a GTK list:
I wrote a bunch of stripped-down non-GTK test scripts to try and see how
and where the Excel problem arises... and all of my non-GTK test scripts
work perfectly (e.g. EXCEL.EXE exits after the script terminates).
However, adding the line: dl("php_gtk." . (strstr(PHP_OS, "WIN") ?
"dll" :
"so"));
to a correctly-functioning script will cause "EXCEL.EXE" to remain
in memory after script termination. The php_gtk.dll library *seems* to be
(at least partially) responsible for EXCEL.EXE not terminating correctly,
becuase the sole determinant of EXCEL.EXE staying resident in memory
seems to be the dl(...) line.
Has anyone here ever used GTK and COM in the same program?
Have you had problems with COM objects hanging around past
script termination?
I had thought originally that maybe i wasn't destroying GTK widgets
properly, but the test script never builds any GUI widgets, yet
still exhibits the EXCEL.EXE resident problem.
Thanks in advance,
--
Scott Hurring <scotth at eac dot com>
Systems Programmer
EAC Corporation
---