The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Script failing, thinks its the server, can someone help?

Discussion in 'General Discussion' started by trackpads, Oct 10, 2006.

  1. trackpads

    trackpads Active Member

    Joined:
    Jul 5, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I am asking since I see so many other knowledgable folks on here. I have installed ffmpeg and a youtube clone script on my main site. The problem is in the upload and processing script.

    I have set php and apache to allow up to 50mb file uploads and that is working just fine. Here is what is supposed to happen with the script and wha tis really happening:

    1. Information page is displayed with input boxes.
    2. When a user submits this page a row in the video database is created
    3. The users uploads the file on the next page
    4. This page then calls ffmpeg to process the video into an flv formatted file.
    5. Once ffmpeg is complete the script takes the input from ffmpeg and updates the row in the database with the flv name and the video duration.

    Here is what is weird. If the file is less than about 5mb, then all of this works no prob. More than 5mb and the script fails right before #5 above. The video flv is created no matter how big the uploaded video but for some reason the script is broken and the data is never sent back from ffmpeg.

    Has anyone ever heard of something like this? I can cnfirm its not ffmpeg. I have manually converted huge videos up to 75mb from the shell and it will do it with no errors. The installer of the script thinks that for some reason if the server is using too much resources for too long it doesnt allow ffmpeg to report back to the script like it will for smaller and shorter files.

    I have tried everything I know (which isnt alot mind you). I am hoping someon here might be able to point me in the right direction.

    Thanks again for any help you can give,

    -Jason
     
  2. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    probably php's script timeout catching you out (not a good idea to increase it though)
     
  3. trackpads

    trackpads Active Member

    Joined:
    Jul 5, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6

    You know I thought that so to test I set it to an unbelieveably high nuber and still no luck. You are talking about the setting in php.ini right?

    Thanks again for the help,

    -Jason
     
  4. mtha

    mtha Registered

    Joined:
    Sep 27, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Same site, same problem, more info:
    - the upload process works fine (the file got uploaded)
    - the converting process works fine (ffmpeg process show up on >ps and generated the file)
    - running a php script to do the ffmpeg process from shell works fine (the file got converted and print out the next command)
    - running the same php script from browser, the browser stops after about 30s. (the file is still created, but the next command in php script is not executed)

    I tried to increase time limit setting in in php.ini, the browser timeout is still about 30s.
    I tried to add @set_time_limit(900); (safe_mode off) at the beginning, it doesnt work in this case.

    any other suggestion?
     
  5. totalchoice

    totalchoice Member
    PartnerNOC

    Joined:
    Dec 28, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Can you run this command on your server and see if it fails, as we are facing the same issue as you are.

    tmpwatch 4 /tmp

    If the outout is nothing your good, if you get memory errors then welcome to the club.
     
Loading...

Share This Page