This content has been marked as final. Show 6 replies
I've executed perl on a Windows server by putting the perl executable itself as the name, and the script name as the first argument. May or may not address your issue, but could be worth a try...
<cfexecute name="C:\Perl\bin\perl.exe" timeout="60"
Thanks, but that didn't work either. It seems to recognize the path to Perl (/usr/bin/perl, for example) because if I put in an invalid path, it gives an error ("java.io.IOException: /usr/bin/perlssss: not found").
However, if I put in a script name that doesn't exist:
<CFEXECUTE NAME="/usr/bin/perl" ARGUMENTS="doesntexist.pl" TIMEOUT="60"/>
I don't get an error. It's just not attempting to execute anything.
What happens if you give a full pathname to the script? In your example, you just had doesntexist.pl without a full path.
Seems like perl is running, but it might be outputting an error to stderr. Does CFEXECUTE capture stderr output, or only stdout? (I don't know offhand.)
I did try the full path. No luck.
I don't think CFEXECUTE captures stderr output.
Any other ideas?
Is the CF service running under the system account? And does the system account have execute access to the Perl exe? Are there any credentials required to execute the Perl script? Even if not, is there any way to pass credentials as an argument?
I had a similar problem a while back that drove me mad for days, related to attempting to execute svn.exe with various parameters. The cleanup and info actions worked fine, but the update action would fail (and hang the cmd.exe process). Turns out I found a command line switch to explicitly pass along my svn credentials, and that did the trick.
Have you successfully CFExecuted ANY Perl script? If you try one that simply echoes a hello, does that work?