So... I was right with my reply to Andrew (who is also having CFEXECUTE problems).
Interestingly enough, the Cold Fusion Manual (yes, those paper things that have also made their way into our computers as slabs of HTML) clearly states how the ARGUMENTS parameter is parsed and used.....
You can pass a string or an array.
If it's a string - then under Windows it just passes the string on to the application (in the case of a C/C++ app - this will be parsed into argv/argc). Under Unix/Linux it is parsed into and array of arguments (separator is a space using normal Unix command line parsing rules).
If it's an aray - then under Windows they are all concatenated back into a string!!! (duh!!! - they could have used the exec api as they are doing in Unix). In Unix/Linux the array is copied into the arguments of the exec() call.
So - there you have it - and it's in black and white too - page 83 in my book.
I don't often rant like I am about to - but.......
<rant>
Why do people automatically just jump onto a list at the slightest sign of trouble? What ever happened to the pride of tracking down a problem by searching through the documentation? And then, when all hope was lost, firing up a browser and searching for all manner of things - probablly through Google - to see if there were any answers already out there? But no - these days we just seem to throw a query onto the list - even when half the syntax of what we are trying to do is not "kosher" within what we are trying to do!!!
You know - I rather have Scott's "off topic" raves!!!
</rant>
Geee - I must have woken up on the wrong side of the pool this morning!!
Gary Menzel
IT Operations Brisbane -+- ABN AMRO Morgans Limited
Level 29, 123 Eagle Street BRISBANE QLD 4000
PH: 07 333 44 828 FX: 07 3834 0828
[EMAIL PROTECTED] wrote on 03/21/2003 09:09:04 AM:
> Ok,
>
> This is from the wisdom of that which is Spike.
>
> 1. If you want to pass multiple arguments to cfexecute you need to pass them
> as an array. Each argument is a separate array element, and the arguments
> should be added to the array in the order that you want to user them.
> 2. If you want to debug your cfexecute call, the easiest way is to specify
> an outputfile attribute.
>
> Example:
>
> <cfset args = arrayNew(1)>
> <cfset args[1] = "username">
> <cfset args[2] = ">>">
> <cfset args[3] = "/path/to/file/space.log">
>
> <cfexecute name="/path/to/file/user_web_usage.plx" arguments="#args#"
> timeout="5" outputfile="/path/to/file/foo.log" />
>
> Spike.
>
> We now return you to your scheduled programming.
>
> "Brad Apps" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> >
> > Hey Guys,
> >
> > Got a funny one for you:
> >
> > I used to use this code to get the disk usage for our clients web space
> > used:
> >
> > <cfsavecontent variable="homespace">
> > <cfexecute name="du -hs /home/#homedir#" timeOut="1"></cfexecute>
> > </cfsavecontent>
> >
> > This worked fine until we decided we wanted to calculate the users mail
> > directory size which doesn't have permissions for apache (which CF is
> > running as)to read the size. Therefore we decided to get a perl script
> > which can be run as apache, which inturn changes the uid to the particular
> > user to get all of the right sizes and out put them. When i run the
> > script as apache from the command line ./user_web_usage.plx 'username', it
> > works fine. but when i put it in a cfexecute tag it outputs nothing.
> >
> > Example:
> >
> > <cfsavecontent variable="homespace">
> > <cfexecute name="/path/to/file/user_web_usage.plx 'username'"
> timeOut="1"></cfexecute>
> > </cfsavecontent>
> > #homespace#
> >
> > I tried extending the timeout and using the arguments variable of the
> > cfexecute tag to include the username with no joy. Any suggestions would
> > be greatly appreciated. Or any recommendations on how we should do this.
> >
> > Thank you.
> >
> >
>
>
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
****************************************************************************
If this communication is not intended for you and you are not an authorised
recipient of this email you are prohibited by law from dealing with or
relying on the email or any file attachments. This prohibition includes
reading, printing, copying, re-transmitting, disseminating, storing or in
any other way dealing or acting in reliance on the information. If you
have received this email in error, we request you contact ABN AMRO Morgans
Limited immediately by returning the email to [EMAIL PROTECTED]
and destroy the original. We will refund any reasonable costs associated
with notifying ABN AMRO Morgans. This email is confidential and may contain
privileged client information. ABN AMRO Morgans has taken reasonable steps
to ensure the accuracy and integrity of all its communications, including
electronic communications, but accepts no liability for materials
transmitted. Materials may also be transmitted without the knowledge of ABN
AMRO Morgans. ABN AMRO Morgans Limited its directors and employees do not
accept liability for the results of any actions taken or not on the basis
of the information in this report. ABN AMRO Morgans Limited and its
associates hold or may hold securities in the companies/trusts mentioned
herein. Any recommendation is made on the basis of our research of the
investment and may not suit the specific requirements of clients.
Assessments of suitability to an individual's portfolio can only be made
after an examination of the particular client's investments, financial
circumstances and requirements.
****************************************************************************
--- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
- [cfaussie] RE: cfexecute problem... Mark Stanton
- [cfaussie] RE: cfexecute problem... Brad Apps
- [cfaussie] RE: cfexecute problem... Mark Stanton
- [cfaussie] RE: cfexecute problem... gary menzel
- [cfaussie] RE: cfexecute problem... Brad Apps
- [cfaussie] RE: cfexecute problem... gary menzel
- [cfaussie] Re: cfexecute problem... Scott Barnes
- [cfaussie] Re: cfexecute problem... gary menzel
- [cfaussie] Re: cfexecute problem... Brad Apps
- [cfaussie] Re: cfexecute problem... gary menzel
