Faraz Ahmed
Faraz Ahmed

Reputation: 11

FFMPEG is not working with php exec() function

i couldn't be able to execute ffmpeg command using php exec() function. Actually all was fine and running before but by mistake we execute this command in SSH -d safe_mode=off after that we are facing this problem. we have on it from the plesk pannel and also checked in php.ini it is safe_mod=on but still we couldn't be able to execute ffmpeg command through exec() function. Can any one help me please.

Thanks, Faraz

Upvotes: 0

Views: 1282

Answers (1)

HTDutchy
HTDutchy

Reputation: 1130

For exec() to work, you need to have save_mode=off in your php.ini

So the fix should just be: edit the save_mode=on line inside your php.ini to save_mode=off And restart your webserver

The ssh command should not have anything to do with your webserver.

In the php.net documentation (http://nl3.php.net/manual/en/function.exec.php) They say:

Note: When safe mode is enabled, you can only execute files within the safe_mode_exec_dir. For practical reasons, it is currently not allowed to have .. components in the path to the executable.

Upvotes: 1

Related Questions