RE: [PHP-WIN] Re: exec() without waiting for completion in Win2k
| From: | Rich Gray | Date: | Mon, 09 Sep 2002 05:42:44 +0000 |
| Subject: | RE: [PHP-WIN] Re: exec() without waiting for completion in Win2k | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15717@lists.php.net to get a copy of this message | ||
Sorry ... I misunderstood (i.e. didn't bother to read your post fully!) -
look into running the AT command to run the command asyncronously
i.e.
<?
$time=date("H:i");
exec(getenv('WINDIR').'\\system32\\at.exe '.$time.'
C:\MyPath\MyScript.bat');
?>
Rich
-----Original Message-----
From: Noel Llopis [mailto:llopis@comcast.net]
Sent: 08 September 2002 13:43
To: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Re: exec() without waiting for completion in
Win2k
On Sun, 08 Sep 2002 15:32:31 -0700
Kurtis Harper <napalm@pei.eastlink.ca> wrote:
> I am having problems as well with exec() but this may help in your
> case, try single quotes, eg add this to your php script: exec ('start
> C:\path\to\your\bat\file\build.bat');
I'm afraid it didn't. Still the same problem. The page just waits for
the process to end.
On Sun, 08 Sep 2002 20:56:28 -0700
Rich Gray <richardgray@onetel.co.uk> wrote:
> What does this do....?
>
> exec(getenv('COMSPEC').' /c c:\path\to\your\bat\file\build.bat >NUL');
>
> Do you see any errors in the log file?
No luck with that either. COMSPEC is defined as D:\WINNT\system32\cmd.exe ,
which is what I would expect.
Here's a simplified version. How about starting notepad from PHP? Can
anybody do that and have the web page finish generating before Notepad
is closed? It helps to try it out with the console version of Apache,
that way you can close Notepad by hand (instead of having to kill it
from the process list).
If anybody can get that to work, let me know. I would change my
configuration to match yours.
Thanks for all the suggestions so far.
--Noel
llopis@comcast.net
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php