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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirecting to another url after a long exec command 1

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,

I have a follwoing code segment in php
Code:
exec ("some long linux command to execute");
header ("Location:[URL unfurl="true"]http://www.domain.com/thankyou.php");[/URL]

I was wondering if there is a way to have the linux command in exec to run in the background and instantly redirect the user to thankyou.php?

Currently, the thankyou.php only shows up after the time consuming linux command has executed.

Any input on this will be great ! :)
 
Straight from the php..net online manual:
PHP.net said:
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.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top