>
>I'm surprized I can't find a description of how to do what seems
>like an obvious thing to me: I want to have my script send output
>to the user, then drop the connection, and then continue doing
>stuff that the user shouldn't have to wait for.  There's lots of
>documentation about what to do when the user drops, but no mention
>of how to make the server drop it but keep running the script.

http://php.net/exec and put an & at the end...

However, *IF* your script messes with stdin and/or stdout, that may not be
enough, and you have to muck with making a stub script that has the & in it,
and then PHP calls the script that forks the script that does the work.

I never did quite track down when you could or couldn't just throw & into an
exec() call, but it's somehow tied to the binding of stdin and stdout by
Apache, PHP, the shell, the PHP user and their environment (or lack thereof)
and...  Well, I was getting a headache, and a one-line shell script to do
the & for me was better than taking more aspirin.

Hope I'm making sense.  It's getting late and I should sleep now.

-- 
Like Music?  http://l-i-e.com/artists.htm


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

Reply via email to