Apache SuPHP+SafeMode oFF + exec() not work

speckados

Well-Known Member
Hi.

I've a problem on server with Apache+SuPHP and php.ini per virtualhost.

Global PHP has Safe Mode On
Local PHP has Safe Mode off (se on phpinfo())

I run a test-->

Code:
<?php
     if (exec('/usr/bin/ffmpeg -i 47.mp4 -acodec aac -ab 128kb -vcodec mpeg4 -b 1220kb -mbd 1 -s 320x180 final_video.mov"'))
         { echo "Success"; }
     else { echo "No good"; }
?>
But get this message
Code:
sh: /usr/local/php/bin/ffmpeg: No such file or directory
Apreciate help
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

It's important to note that safe_mode itself is seen to be problematic and has actually been deprecated since PHP 5.3:

PHP: Safe Mode - Manual

You may want to consider disabling safe_mode globally, as most of it's benefits are already included with suPHP.

Thank you.