RE: Word instance not closing after call to $word->Quit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Has anyone helped you so far? 
Looks like a reference counting problem in PHP. There were such problems in the past but they were resolved.
I assume this happens with any COM object you are trying to open?

Andi

> -----Original Message-----
> From: Sascha Meyer [mailto:harlequin2@xxxxxx]
> Sent: Thursday, December 11, 2008 1:48 AM
> To: php-windows@xxxxxxxxxxxxx
> Subject:  Word instance not closing after call to $word->Quit()
> 
> Good morning to you,
> 
> one of my scripts creates a winword COM reference, creates a new document,
> appends data and saves the file to disk; works like a charm, but the word
> instance remains after the script has finished.
> 
> To test this issue, I created the following minimalistic script:
> 
> [CODE]
> <?php
> $word = new COM("word.application") or die("Unable to instantiate Word");
> $word->Quit();
> try {
>         // If not caugt, a fatal exception is thrown because "Release()" is
> not defined
>         // Means, I could also skip this line ...
> 	$word->Release();
> } catch (Exception $ex){
> 
> }
> $word = null;
> unset($word);
> ?>
> [/CODE]
> 
> The word instance is created fine, the script ends without errors, but the
> WINWORD.EXE remains in the task manager for eternity ...
> 
> Any ideas how to fix this?
> 
> My setup:
> * Windows 2003 Server
> * PHP 5.2.5.5
> * Word 2003
> 
> Thanks in advance!
> 
> Regards, Sascha
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:
> http://www.gmx.net/de/go/multimessenger
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux