I saw the post about
exec("nohup mp3123 -y -Z --all 1>/dev/null/ 2>&1 > &");
I decided to do a little test of my own because I would like to add this
functionality to some of my sites.

Here is my env:
Redhat 6.3
Apache 1.3.12
PHP 4.0.3

I wrote a little shell script to test with called sleep.ksh

#!/bin/ksh
sleep 30
DAT=`date`
print "Woke up at $DAT" > /tmp/outfile

I then wrote a little PHP script to test this in the background

<html>
<head> <title>  Sleep test  </title> </head>
<body>
<?php
print "Trying to exec";
exec("nohup ./sleep.ksh &");
?>
</body>
</html>


When I run it from the command line it works as expected and returns the command line
to me immediately.
When I run it from the browser it takes 30 seconds to run

Am I missing something?  Is there a better way to run this?


Thanx in advance,

BEH


-- 
PHP General 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