0

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

2
  • Your real question is how to turn safe mode off in PHP, isn't it? Commented Mar 22, 2011 at 8:32
  • You may find an answere here: stackoverflow.com/search?q=php+safe+mode+off Commented Mar 22, 2011 at 8:37

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

It was already safe_mode=on in php.ini but still exec() is not working. please help me.
sorry, It needs to be safemode OFF (I got distracted during writint this, sorry again :/)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.