tibberous Posted April 18, 2008 Share Posted April 18, 2008 I wrote a PHP script that uses FFMPEG to encode multiple mp3 files in a directory. I script works perfectly when called from the command line, but I can't get it to run in the background. I've tried: php /home/express/www/scripts/processMusic.php > /dev/null & php /home/express/www/scripts/processMusic.php < /dev/null > /dev/null & php /home/express/www/scripts/processMusic.php & But nothing works... And php /home/express/www/scripts/processMusic.php < /dev/null > /dev/null & works from the command line, but not from within a webpage. To make things weirder, the script I wrote run, just the ffmpeg commands don't work... Am I just not able to start a background process from a background process? Quote Link to comment Share on other sites More sharing options...
jonsjava Posted April 18, 2008 Share Posted April 18, 2008 while [ 1 ]; do `php /home/express/www/scripts/processMusic.php -q`;sleep 3; done; This will run forever Quote Link to comment Share on other sites More sharing options...
tibberous Posted April 18, 2008 Author Share Posted April 18, 2008 Thing is, I want to call it from a web page. If it runs forever, the page won't load. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.