You are here: COM dlls not unbinding at script end « PHP « IT news, forums, messages
COM dlls not unbinding at script end

Posted by Alex Turner on 12/31/05 17:24

I am doing a lot of PHP work with COM. The system uses php 4.3.3.3 and
php is being driven via FCGI from our own web server (TAG).

We create an instance of an in-process COM server using the following
technique:

function GetFactory()
{
static $obj;
static $objSet = 0;
if($objSet==0)
{
$obj=new COM("TPN_Obj.JDCom_Factory");
$objSet=-1;
}
return $obj;
}

The returned COM object is then used as a factory to all our other COM
objects.

The snag is that the binding to the COM dll is not being released at the
end of script execution. This is visible using ProcessExplorer from
SysInternals.

If I call com_release the returned ref-count is zero. To ensure that
php's garbage collector was not the culprit, I tried repeatedly calling
com_release at the end of the script - no change.

The upshot of this issue is that each PHP process in the FCGI process
pool gradually gets bigger as more and more dlls are bound :-(

Any ideas are welcome, I have gone through the php source but cannot
quite figure the problem. As we are going over to our own build of 4.4.1
asap, a C level fix would be great :-)

Thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация