Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fire and forget

Status
Not open for further replies.

skiflyer

Programmer
Joined
Sep 24, 2002
Messages
2,213
Location
US
Is there a way to fire off a process not dependant on the PHP process tree? (Talking windows CLI version here)

Basically I want to run a program which will not end, it is a modal window if I remember my terminology properly... but I want my PHP script to finish anyway.
 
what about a clients-side js call opening a new window which invokes the page?

Guess it would depend on what the trigger criteria is for the...


Bastien

Cat, the other other white meat
 
There are no pages involved, this is a command line interface.
 
what about exec?


Bastien

Cat, the other other white meat
 
Maybe exec combined with the following note will work, the question will be how to redirect for this particular program. I'll have to tinker.


Note: If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends.
 
Windows 2000 Server, using PHP 4.3.5... but not the standard executable, I'm using the CLI executable.

 
So after doing some research the solution is exec combined with redirecting the output to dev/null (or whatever the Windows equivalent is)... either one alone isn't enough.
 
The easiest way is likely to use PHP to configure the Win32 "at" service to run the other programs immediately.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Ah yes, I remember using that in the past.

Unfortunately I won't see this server again for a couple weeks so I'll find out then.

Thanks both of you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top