note 23820 added to function.exec
| From: | mightye at mightye dot org | Date: | Mon, 29 Jul 2002 16:32:05 +0000 |
| Subject: | note 23820 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33876@lists.php.net to get a copy of this message | ||
PHP pages will still hang waiting on exec()'d processes to finish before the server sends eof
to the browser, at least with php4.1.2 on apache 1.3.24. I'm trying to create a web-based
interface to a MP3 player using mpg123. I exec("mpg123 -v \"$HTTP_GET_VARS[item]\"
> /tmp/mpg123status 2>&1 &");, and the rest of my script executes fine, but at
the exit(); or end of the script, the browser just sits there holding its page until the mpg123
status either finishes on its own, or is terminated. As under my setup, that means no further
requests will be fulfilled to the php script that is still hanging, this becomes a problem.
I haven't been able to identify a means to allow the script to terminate, yet allow the sub
process (mpg123) to continue, has anyone had luck obtaining this sort of result? Halting the script
via stop in the browser, or terminating on the command line allows the mpg123 process to continue,
and further requests for my php script to be honored.
--
http://www.php.net/manual/en/function.exec.php
http://master.php.net/manage/user-notes.php?action=edit+23820
http://master.php.net/manage/user-notes.php?action=delete+23820
http://master.php.net/manage/user-notes.php?action=reject+23820