
charedrive
Novice
Aug 29, 2014, 1:55 PM
Post #5 of 14
(5618 views)
|
Re: [FishMonger] can't execute command line with perl/coldfusion 10
[In reply to]
|
Can't Post
|
|
This is the coldfusion call: <cfexecute name="#EDRSDIR#/uploadconvertwrapper.pl" arguments="#filedirectory# #finalfilename# #dcnflag# #splflag#" outputFile="/dev/null" timeOut="0" /> uploadconvertwrapper.pl does this: my($directory,$filename,$dcnflag,$splflag) = @ARGV; $ENV{'USER'} = "edcc"; $autofile = "/apps/edcc/htdocs/edcc/edrs/uploadconvert.pl"; open(OUTLOG ,">> /apps/edcc/logs/uploadconvert.log"); print OUTLOG "Start of $directory, $filename, $dcnflag, $splflag\n"; unless (fork){# execute JOB file in background exec '/apps/perl/bin/perl', $autofile, $directory, $filename, $dcnflag, $spl flag; }#end unless print OUTLOG "End of $directory, $filename, $dcnflag\n"; close(OUTLOG); exit 1; and uploadconvert.pl does this: ....... # print ALEX qq^ps file submitted. prep for distill.\n^; print ALEX qq^---cmd: $DISTILLCOMMAND $IN_DIR/$newfilename\n^; #Just distill it system("$DISTILLCOMMAND $IN_DIR/$newfilename"); sleep 5; #setup the new filename ($prefix = $newfilename) =~ s/\.\w+$//; $newfilename = $prefix . ".pdf"; print ALEX qq^new filename is: $newfilename\n^; #copy it to the correct location .......... I can follow the progress with the print commands just fine. The ALEX log updates however I execute the perl script (directly or coldfusion) so i know the coldfusion can find and execute the perl. The result is supposed to be a new .pdf file in the same directory but that doesn't happen through coldfusion.
(This post was edited by charedrive on Aug 29, 2014, 1:55 PM)
|