Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl on Coldfusion

Status
Not open for further replies.

cfm

Programmer
Mar 27, 2001
76
CL
Cannot execute j:\lee_numero.pl

Windows NT error 193 occurred.

-----------------------------------------
<cfexecute name=&quot;j:\lee_numero.pl&quot;
arguments=&quot;10000&quot; outputfile=&quot;j:\temp.txt&quot;>
</cfexecute>
------------------------------------------
any idea??

cfexecute is enabled in coldfusion server....

thanks.

 
I'm pretty sure if you want a Perl scrit executed, you need to do it by using the Perl compiler. Try using <cfhttp>. I think that get you a lot better results (plus a lot more secure - never use cfexecute unless you absolutely have to). ----------------------------------------
Is George Lucas Kidding...
 
I have a few questions for you first before answering this:

1. What system are you running?

2. If you try running this through the command line, can you execute the script by typing:
[tt]perl j:\lee_numero.pl 10000[/tt]

If not, then what command would you use to run it?

- tleish
 
thanks....

it's worked........this:


<!--------custom tag------------------>
<cfparam name=&quot;attributes.numero&quot; default=&quot;&quot;>

<cftry>
<cfset attributes.numero=&quot;c:\perl\bin\lee_numero.pl&quot;&&quot; &quot;&attributes.numero>

<cfexecute
name=&quot;c:\Perl\bin\perl.exe&quot;
arguments=&quot;#attributes.numero#&quot;
outputfile=&quot;c:\perl\bin\temp.txt&quot;
timeout=&quot;1&quot;>
</cfexecute>

<CFCONTENT TYPE=&quot;text/html&quot;
FILE=&quot;c:\perl\bin\temp.txt&quot; DELETEFILE=&quot;No&quot;>

<cfcatch type=&quot;Any&quot;>
Error.
</cfcatch>
</cftry>
<!--------custom tag------------------>
 
on windows 2000 Professional, Coldfusion server 4.5.1
 
Here's some variations. The code is a little shorter.

Note, if you leave out outputfile=&quot;c:\perl\bin\temp.txt&quot; then you do not need to use
<CFCONTENT TYPE=&quot;text/html&quot;
FILE=&quot;c:\perl\bin\temp.txt&quot; DELETEFILE=&quot;No&quot;>


This would be a better solution because you wouldn't have to worry about using <CFLOCK> when reading and writing to a text file. If you had 2 or more people viewing it at the exact same time, the .txt file could become a problem.


Using cmd.exe (Windows Command):

[COLOR=666666]<!--------custom tag------------------>[/color]
<cfparam name=&quot;attributes.numero&quot; default=&quot;&quot;>

<cftry>

<cfexecute name=&quot;C:\WINNT\system32\cmd.exe&quot;
arguments=&quot;/c perl c:\perl\bin\lee_numero.pl #attributes.numero#&quot;
timeout=&quot;1&quot;/>


<cfcatch type=&quot;Any&quot;>
Error.
</cfcatch>
</cftry>
[COLOR=666666]<!--------custom tag------------------>[/color]

OR Using perl.exe

[COLOR=666666]<!--------custom tag------------------>[/color]
<cfparam name=&quot;attributes.numero&quot; default=&quot;&quot;>

<cftry>

<cfexecute name=&quot;c:\Perl\bin\perl.exe&quot;
arguments=&quot;c:\perl\bin\lee_numero.pl #attributes.numero#&quot;
timeout=&quot;1&quot;/>


<cfcatch type=&quot;Any&quot;>
Error.
</cfcatch>
</cftry>
[COLOR=666666]<!--------custom tag------------------>[/color] - tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top