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

trackpads

Active Member
Jul 5, 2004
36
0
156
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
 

trackpads

Active Member
Jul 5, 2004
36
0
156
nickp666 said:
probably php's script timeout catching you out (not a good idea to increase it though)

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
 

mtha

Registered
Sep 27, 2006
1
0
151
trackpads said:
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
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?
 

totalchoice

Member
PartnerNOC
Dec 28, 2004
9
1
153
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.