Hi.  I have a similar problem trying to make cfexecute work.  Hope I could find an answer and any answer is appreciated.   I have a simple executable script written in perl that I call using cfexecute.  It is called by way of flash remoting using cffunction via cfc.  The script is supposed to print directly to my serial receipt printer /dev/ttyS0.  A cash drawer is connected to this receipt printer that kicks off open.  The drawer kicks-off but the printer won't print.  It just moves up one line and prints nothing.  I've already set the permission to 777 for the particular print_form.pl file.  I am able to print the print_form.pl in the command line using $ "print_form.pl>/dev/ttyS0".  Here is a part of my cfc:

<cffunction hint="Update the Paid field upon confirmation of CA"
    name="confirmCAReturns"
            access="remote"
            returnType="string">

... a lot of other codes are here

... This is where th action begins...

<!--- Kick off the drawer --->
<cfexecute name = "echo -e \020\024\001\000\001\005"
           outputfile="/dev/ttyS0"
   timeout = "1">
</cfexecute>

<!--- Write to a file that will be processed by the perl script for formatting--->
<cffile action=""> file = "/opt/coldfusionmx/wwwroot/DMS/receipts/print_details"
output = "#cfv_receipt#"
mode = "777"
charset = "US-ASCII"
addnewline = "Yes">


<!--- Print receipt --->

<cfexecute name = "/opt/coldfusionmx/wwwroot/DMS/receipts/print_form.pl"
   outputfile="/dev/ttyS0"
   timeout = "1">
</cfexecute>


...and so are here

</cffunction>

I hope anyone of you could provide some answers for i'm really frustrated with this. I'm using the built-in webserver for coldfusion and Mandrake-10.

Thanks in advance...
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to