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? Link to comment https://forums.phpfreaks.com/topic/101755-need-to-have-a-website-run-a-lengthy-ffmpeging-script/ 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 Link to comment https://forums.phpfreaks.com/topic/101755-need-to-have-a-website-run-a-lengthy-ffmpeging-script/#findComment-520586 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. Link to comment https://forums.phpfreaks.com/topic/101755-need-to-have-a-website-run-a-lengthy-ffmpeging-script/#findComment-520643 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.