PHPcoder25 Posted August 5, 2007 Share Posted August 5, 2007 Hey everyone, I've been trying to find the right hosting company for while now. I finally went with vexxhost. Their main problem is they have apache timeout set to 60! (default usually 300). So my conversion video to .flv times out after 60 seconds! I use the follow code: $command = "/usr/local/bin/ffmpeg -i /home/user/public_html /test/moviefile.mpg -ar 22050 -ab 32 -qscale 4 -f flv -s 400x300 /home/user/public_html/test/outputmovie.flv"; exec($command,$output); Since the video file converts to .flv format at 200KB/sec, I cannot convert anything over about 6MB on on my current host... I asked them to up the timeout, but they gave me some run-around about optimization Should I just switch hosts? Is there a way to communicate back to server with my script while the exec($command,$output) is being executed, so it doesn't timeout or should I use another method? I heard something about the ob_start() function? Thank you very much! Quote Link to comment https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/ Share on other sites More sharing options...
wildteen88 Posted August 5, 2007 Share Posted August 5, 2007 You could try addding the following at the top of your script: ini_set('max_execution_time', '300'); Quote Link to comment https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/#findComment-316139 Share on other sites More sharing options...
PHPcoder25 Posted August 5, 2007 Author Share Posted August 5, 2007 Thanks wildteen88, I have the max_execution_time set to 100 through .htaccess. It seems since apache timeout is set to 60, it will time out anways. Will this still make a difference to put ini_set('max_execution_time', '300'); at the top of the script? Is there some sleep function I could use, that will allow the script to send an echo after about 30 seconds so the FFMPEG command doesnt timeout after 60 seconds? Quote Link to comment https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/#findComment-316143 Share on other sites More sharing options...
Crew-Portal Posted August 5, 2007 Share Posted August 5, 2007 If You switch hosts go to www.Startlogic.com. They have 300GB storage and 3TB of bandwidth p/ month and its only 5 bucks p/ month! I know alot (well only one that I personnaly know) switch to startlogic just cause its kinda better! But unfortunitly I find that they seem to have a few errors like the website stopping at certain points (Timeouts) But oh well its really good (Maybe?) depending on what you need! Quote Link to comment https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/#findComment-316144 Share on other sites More sharing options...
hostfreak Posted August 5, 2007 Share Posted August 5, 2007 If You switch hosts go to www.Startlogic.com. They have <b>300GB storage and 3TB of bandwidth p/ month and its only 5 bucks p/ month</b>! I know alot (well only one that I personnaly know) switch to startlogic just cause its kinda better! But unfortunitly I find that they seem to have a few errors like the website stopping at certain points (Timeouts) But oh well its really good (Maybe?) depending on what you need! Talk about over selling... big time! Quote Link to comment https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/#findComment-316148 Share on other sites More sharing options...
PHPcoder25 Posted August 5, 2007 Author Share Posted August 5, 2007 I already tried startlogic. They do not have PHP-FFMPEG. The main thing I need to know is if its possible to create a sleep function that after about 30 seconds to send an echo while the exec($command,$output) is running, so the page wont timeout after 60 seconds. Quote Link to comment https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/#findComment-316156 Share on other sites More sharing options...
Crew-Portal Posted August 6, 2007 Share Posted August 6, 2007 Hmmm.. Thats interesting. Not really related to your problem but do You use XML to convert your AVI TO FLV? Quote Link to comment https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/#findComment-316412 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.