cfexecute output on linux
Hey everyone, I'm working on doing some stuff with cfexecute via Linux (Ubuntu Server), running ColdFusion 9. I am having trouble capturing the output of the command that is executed. Here is the cfexecute line of code:
<cfexecute name="/usr/local/bin/ffmpeg" arguments="-i '#qGetFiles.directory#/#qGetFiles.name#' 2>&1" outputFile="/home/username/output.txt" timeout="30"></cfexecute>
I have also tried the following, but just get an empty variable returned:
<cfexecute name="/usr/local/bin/ffmpeg" arguments="-i '#qGetFiles.directory#/#qGetFiles.name#' 2>&1" variable="mediaInfo" timeout="30"></cfexecute>
<cfoutput>'#mediaInfo#'</cfoutput><br>
I realize I'm using variables for the input source file path and have verified the paths are all valid. I verified my CF server is running as root so I know it has the right permissions. I'm not getting any error message. I can run the command directly at the CLI with no issues. I have tried this same code on a Windows server and was able to make it work. I have also verified that the "2>&1" approach to redirecting the stderr to the output (thanks Ben Forta) works on the Linux OS.
Anyone out there have experience getting access to the output created by cfexecute on a Linux server? I'm totally stumped on this one would very much appreciate someone coming to my rescue. ![]()
