Login as the user which runs the web server and try access mplayer and see if it works.
What is the result for
ls -l /usr/bin/ |grep mplayer
Login as the user which runs the web server and try access mplayer and see if it works.
What is the result for
ls -l /usr/bin/ |grep mplayer
vShare Hosting, vShare Installation, Server Setup, Lighttpd streaming, vShare Templates
[email protected]
Here's what I get doing that as the nobody user:
# sudo -u nobody ls -l /usr/bin | grep mplayer
-rwxr-xr-x 1 root root 8207616 Dec 4 2008 gmplayer
-rwxr-xr-x 1 root root 7741080 Dec 4 2008 mplayer
The mplayer binary should have world execute permissions. I've tried putting 777 permissions on all the directories involved in the process but nothing has worked.
I'm starting to think that maybe this is a PHP issue. I feel like I've seen this before, where PHP didn't have permission to run a shell script. I have all the required entries in php.ini, but the default php.ini file had a lot of other directives.
try creating a php script with following content and run it
<?php
echo exec('whoami');
?>
vShare Hosting, vShare Installation, Server Setup, Lighttpd streaming, vShare Templates
[email protected]
Yeah, that works fine too. I cannot reproduce the error on the commandline as any user.
What's weird is the format of the error:
sh: /usr/bin/mplayer: Permission Denied
I only see it in the browser (or the debug.txt file) and it only seems to happen with the thumbnail creation. The conversion itself works.
I swear I've seen this happen before with PHP, but I can't remember. Something is preventing the shell from executing the mplayer binary.
I got around this problem by switching from mplayer to gmplayer. I don't know what the difference is, or why the php class that handles the video duration functions seems to handle it differently.
From the command line the mplayer binary is executed directly, from the php script via a browser, it seems to be executed as a shell script.
Bookmarks