0
votes

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

1
Your real question is how to turn safe mode off in PHP, isn't it?Unicron
You may find an answere here: stackoverflow.com/search?q=php+safe+mode+offUnicron

1 Answers

1
votes

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.