Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem With cfexecute

Posted on 2001-07-05
8
Medium Priority
?
680 Views
Last Modified: 2013-12-24
I've tried implementing a piece of code offered as a comment by cf_spike in a previous question by another user

the code is <CFEXECUTE ARGUMENTS="c:\website\htdocs\test.cfm testvar=hello" NAME="c:\cfusion\bin\cfml.exe" TIMEOUT="1"/>

the template test.cfm merely tries to output the variable testvar.
I didn't try to output it with any scope as I was not sure if it would be url or maybe form.

The problem is that the template does not recognise the variable. I suspect it may be the way the arguments atribute is formed, but I don't seem able to get the correct syntax.
0
Comment
Question by:jamathon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 4

Expert Comment

by:CF_Spike
ID: 6257423
Depending on which version of ColdFusion Server you are using the code above may or may not work. It should work in CF 5.0, but may fail in previous versions.

You could try passing the arguments as an array to the cfexecute tag instead:

<CFSET myArray = ArrayNew(1)>
<CFSET myArray[1] = "c:\website\htdocs\test.cfm">
<CFSET myArray[2] = "testvar=hello">
<CFEXECUTE ARGUMENTS="#myarray#" NAME="c:\cfusion\bin\cfml.exe" TIMEOUT="5"/>

The variable is passed in the url scope.

Spike

0
 
LVL 2

Author Comment

by:jamathon
ID: 6257463
I'm running 4.5, it can't seem to pick it up even when I use the array. I had the debugger on to see if any variables were present, and they weren't.

It's not urgent, as I was just interested after seeing your comment on the previous question.
I'll have to wait unti I load cf5
Cheers
0
 
LVL 4

Expert Comment

by:CF_Spike
ID: 6257481
Try running the command from the command line to see if it works.

I have done this in CF 4.5x

Spike
0
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 
LVL 2

Author Comment

by:jamathon
ID: 6257664
I tried c:\cfusion\bin\cfml.exe c:\website\htdocs\test.cfm testvar=hello from a command line

I also tried wrapping testvar=hello in quotes.

neither seemed to work.

any chance of sending me cfml.exe to try from cf5 (It looks like there are 2 associated files in the cfusion\bin.

Thanks
James
0
 
LVL 4

Expert Comment

by:CF_Spike
ID: 6258573
Before I do that,

Can you post the code for test.cfm?

Spike
0
 
LVL 2

Author Comment

by:jamathon
ID: 6258859
I starte out with <cfoutput>#testvar#</cfoutput>.

I then left it as a blank template with the debugger on.
0
 
LVL 4

Accepted Solution

by:
CF_Spike earned 400 total points
ID: 6258866
I can't see anything wrong with that.

what's your email address?

Spike
0
 
LVL 2

Author Comment

by:jamathon
ID: 6259053
james@hard2forget.co.uk

Cheers
0

Featured Post

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question