exec timing out revisited

From: Date: Thu, 08 Mar 2001 14:37:02 +0000
Subject: exec timing out revisited
Groups: php.general 
Request: Send a blank email to php-general+get-43030@lists.php.net to get a copy of this message
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

« previous php.general (#43030) next »