I need a apache /php to recognize ffmpeg command without specifing the full bath of /usr/local/bin/ffmpeg
calling ffmpeg from command line executes the program calling ffmpeg from php via web does not execute the program calling /usr/local/bin/ffmpeg from php via web does execute the program
why: a php script calls youtube-dl (a compiled program) and executes ffmpeg internally
thank you in advance - tried ffmpeg path: which ffmpeg /usr/local/bin/ffmpeg
echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
#php code for testing:
$output = shell_exec('/usr/local/bin/ffmpeg 2>&1');
echo "shell exec /usr/local/bin/ffmpeg <pre>$output</pre>";
#Response:
ffmpeg version 2.5.3 Copyright #(good)
#Second php code for testing:
$output = shell_exec('ffmpeg 2>&1');
echo "shell exec <pre>$output</pre>";
#Response:
sh: ffmpeg: command not found #(bad)