sh: /mencoder: No such file or directory

On December 30, 2009, in CentOS, Fedora, Linux, Tips, Tricks, by phpsolutions

This is the problem caused due to PHP safe_mode restrictions to execute linux commands.

If safe mode is on we can not run linux commands by exec() PHP function.

Try safe mode Off when you want to execute linux tools with PHP….

Disable dangerous function from executing to exec().. that will cause application non functional 🙁

# php mencoder.php

sh: /mencoder: No such file or directory

# cat mencoder.php
<?php exec("mencoder -ovc help"); ?>
# mencoder -ovc help

PHP Safe Mode

PHP Safe Mode

2 Responses to sh: /mencoder: No such file or directory

  1. Anonymous says:

    Hi I stumbled upon this web site by mistake after i was searching yahoo with this issue, I’ve got to say your website is really helpful Furthermore love the theme, its amazing!. I dont have much time for you to read all your post at this time but I have bookmarked it and as well signed up for your RSS feeds. I will be in a short time. many thanks an excellent site.

  2. Anonymous says:

    You completed several good points there. I did a search for the issue and located virtually all people is going in conjunction with with your blog.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.