RE: RE: [PHP-WIN] Word instance not closing after call to $word->Quit()
| From: | Andi Gutmans | Date: | Tue, 16 Dec 2008 16:35:12 +0000 |
| Subject: | RE: RE: [PHP-WIN] Word instance not closing after call to $word->Quit() | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-29102@lists.php.net to get a copy of this message | ||
Hi Sascha,
Sometimes it's add-ins which cause such issues such as desktop search and others. I suggest to
try and disable all add-ins and then try again.
Also you may want to try and start Word in safe mode although I am not sure how to do it via COM
automation. There may be some option which you could pass in.
Let me know if that changes anything.
Andi
> -----Original Message-----
> From: Sascha Meyer [mailto:harlequin2@gmx.de]
> Sent: Tuesday, December 16, 2008 8:15 AM
> To: Andi Gutmans
> Cc: php-windows@lists.php.net
> Subject: Re: RE: [PHP-WIN] Word instance not closing after call to $word-
> >Quit()
>
> Hi Andi,
>
> Andi wrote:
> > 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?
>
> I haven't found a solution yet and currently use a workaround (create an html
> document and send a faked content-type header before sending the content).
> I will have to find a way using WORD with COM because the business requires
> documents with watermarks, page counters, etc and that's just not possible
> with my current "solution".
>
> To get back to your question: I tried a simple Internet Explorer COM call ...
> [CODE]
> <?php
> $iExplore = new COM("InternetExplorer.Application");
> sleep(10);
> ?>
> [/CODE]
> ... and an instance of Internet Explorer (iexplore.exe) appears in the task
> list and is automatically disposed when the script ends - I don't even have to
> call $iExplore->Quit();
> Seems as if it is not a general PHP issue but has to do with Word? Do you have
> any hints for Office-Automation via COM or did you do some tests with
> different Office and PHP versions? If other versions are more stable, then I
> would probably have another version installed on the server instead Office
> 2003.
>
> I will set up a small VBScript to call WINWORD and see if the instance will
> remain in the task list, perhaps this helps clarify the issue.
>
> Thanks for helping!
>
> Sascha
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:
> http://www.gmx.net/de/go/multimessenger