Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/63436-php-apache-gone-in-60-seconds/
Share on other sites

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?

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!  ::)

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!

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.