On Sun, 08 Sep 2002 22:42:44 -0700
Rich Gray <[EMAIL PROTECTED]> wrote:

> 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');
> ?>

Hmmm... Tempting, but there is one big problem. I just found out that
commands executed with AT don't have access to network drives or
settings. Some of this build process involves fetching data over the
network, so it won't work.

I even wrote a C program that calls spawn() on the command you pass on
the command line, but it didn't work either. I can't believe how
frustrating this is. All of which could have been accomplished with a
sinmple & under Unix :-(

Any other ideas? I think I tried just about everything I could think of.
Thanks.


--Noel

> -----Original Message-----
> From: Noel Llopis [mailto:[EMAIL PROTECTED]]
> Sent: 08 September 2002 13:43
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Re: exec() without waiting for completion in
> Win2k
> 
> 
> 
> On Sun, 08 Sep 2002 15:32:31 -0700
> Kurtis Harper <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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
> [EMAIL PROTECTED]
> 
> 
> --
> 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


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

Reply via email to