ID: 8248
Updated by: elixer
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Program Execution
PHP Version: 4.0.3
Assigned To: 
Comments:

This is not a bug.  From the manual (http://www.php.net/manual/en/function.exec.php):

"Note also that 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."

Try changing your code from:

system("/mycommand/myprog &");

to:

system("/mycommand/myprog > /dev/null &");

Sean

Previous Comments:
---------------------------------------------------------------------------

[2001-02-01 15:21:11] [EMAIL PROTECTED]
Have you tried disabling safe_mode?  The command will not be stripped of 
"questionable" characters if safe_mode is disabled.

Sean

---------------------------------------------------------------------------

[2000-12-14 03:50:32] [EMAIL PROTECTED]
the "system", "exec" or "passthru" function cannot support
the background process, such as :
system("/mycommand/myprog &");

The functions will not continue untill "/mycommand/myprog"
is finished, but I wish the PHP can return at once to continue after the myprog is 
started not ended.

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8248&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to