php-windows Digest 11 Dec 2008 09:48:07 -0000 Issue 3545
Topics (messages 29096 through 29097):
Re: PHP and batch-files
29096 by: Don MacGregor
Word instance not closing after call to $word->Quit()
29097 by: Sascha Meyer
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi,
I have a batch file on my server (Win 3K + IIS 6) I can run that by double
click now I want to run that batch file using my PHP page (that Batch file
run an exe on my Server and create a new text file as a result of that) Is
this possible? How?
Thanks
Elizabeth Smith wrote:
>
> Gustav Wiberg wrote:
>> Hi there!
>>
>> I want to use PHP to run as a "batch-file" on the server every night.
>> What are the alternatives for doing this.
>> I'm using II6 and Win2003 Server, and PHP as an ISAPI-module. (vers
>> 5.2.2)
>>
>> Best regards
>> Gustav Wiberg
>
> The easiest way to do this would be to simply install the cli binary as
> well - php.exe (NOT php-cgi.exe) which doesn't need a webserver - and do
> a scheduled task that calls "path to your cli"/php.exe "path to your
> script here" - I use php a lot on windows for generic scripting tasks.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
View this message in context:
http://www.nabble.com/PHP-and-batch-files-tp10911250p20946457.html
Sent from the Php - Windows mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
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
--- End Message ---