ffmpeg - How to isolate server disaster script in PHP? -


oh goodness. never thought need ask this. unfortunately yes, need to!

i have php written script of own uses ffmpeg-php. , ffmpeg-php bastard. input works ok, crashes whole php , server throws internal server error 500. i've tried several times update ffmpeg-php, ffmpeg , on, when input works in version 0.5 in 0.6 wont work. , need sure rest of script processed correctly. , not, because when comes run togdimage() on movie frame have internal server error 500 , no feedback why source.

so peace of mind of users decided need isolate part of script messes ffmpeg-php. need way assure if go terribly wrong in part, rest go on.

try catch not work because not warning, nor fatal error, horrible server-disaster. suggestions?

i think putting script file called ffmpeg-php-process.php , call via http , read result, if internal server error 500 - know not ok.

or there other, more neat ways isolate disaster scripts in php?

ps. don't write need diagnose or debug or find source of error. i'm not damn beginner , i'm not ffmpeg dev mess in it's code, need make users safe now, , it's care now.

if you're getting 500 error, it's because exception of sort being thrown @ level lower of php itself. unless code spinning kind of infinite loop or hitting recursion limit (and since worked version 0.5), there's chance ffmpeg or ffmpeg-php crashing , taking instance of php launched down it.

frankly, there's nothing can php.

your best bet be, since you've got access server, write script in question using language python. there's ton of ffmpeg python plugins, shouldn't have difficult time setting @ all. call python script php , pull in output file. isolate php script failing. it'll away ffmpeg-php (which, @ least me, seems unholy combination).

if you're dead-set on using php (which don't recommend), can launch php script using php-cli outward-facing php script , work there (as python). again, highly recommend avoid this.

hope helps!


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -