Securely using exec with PHP to run ffmpeg

Posted by Venkat D. on Stack Overflow See other posts from Stack Overflow or by Venkat D.
Published on 2009-06-18T02:44:07Z Indexed on 2010/03/17 13:11 UTC
Read the original article Hit count: 158

Filed under:
|
|

I would like to run ffmpeg from PHP for video encoding purposes.

I was thinking of using the exec or passthru commands. However, I have been warned that enabling these functions is a security risk. In the words of my support staff:

The directive 'disable_functions' is used to disable any functions that allow the execution of system commands. This is for more security of the server. These PHP functions can be used to crack the server if not used properly.

I'm guessing that if exec is enabled, then someone could (possibly) execute an arbitrary unix command. Does anyone know of a secure way to run ffmpeg from PHP?

By the way, I'm on a dedicated server. Thanks ahead of time!

© Stack Overflow or respective owner

Related posts about php

Related posts about security