Try this simple script called print.pl
!/usr/bin/perl
open(OUTPUT, "| lpr");
print OUTPUT "Hello from Perl.\n";
close OUTPUT
and create this simple cfm page called testperl.cfm
<html>
<head>
<title>Test Perl Print page</title>
</head>
<body bgcolor="#ffffff">
This is a test of the print.pl script using cfexecute
<cfexecute name="/var/www/html/print.pl"
outputfile="/var/www/html/testoutput.txt" timeout="1"></cfexecute>
<p>Test Should be complete</p>
</body>
</html>
Now even though it creates a file called testoutput.txt, the file
should be empty. Make sure that you change the path to match your
directory. Now this simple perl file ran without any problems on my
machine. I hope you have similar luck.
Thanks,
Derrick
On Aug 5, 2004, at 10:16 PM, John Puzon wrote:
> Derrick,
>
> Yes. I have my /opt/coldfusionmx set to 755 except for
> /opt/coldfusionmx/wwwroot which is 777.��Yes, cat is a shell command,
> but just to show that only bash works while perl does not.��I would
> appreciate if anybody from you could give me a simple executable perl
> script that would print directly to a serial printer /dev/ttyS0 that i
> would run in cfexecute.
>
> Thanks.
>
>
> >Sorry, I missed the post where you changed the permissions to 777.
> Try
> >'su - nobody' just to make sure you can run it as coldfusion. Make
> sure
> >the directory permissions that the perl script in is correct as well
> >for coldfusion (755 or whatever)
> >
> >cat is a shell command
> >
> >Thanks,
> >
> >Derrick
> >
> >On Aug 5, 2004, at 10:21 AM, Derrick Shoemake wrote:
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
