Re: Barcode scanner CGI
On Tuesday 24 September 2002 3:41 pm, fliptop wrote: On Tue, 24 Sep 2002 at 13:24, Geraint Jones opined: GJ:I'm trying to get the output from a barcode scanner into my CGI script. What I GJ:would like to see is the barcode going straight into a text box in my GJ:browser. I am using Device::SerialPort to read the output which works fine as GJ:a normal Perl script, but I don't know how to allow Perl CGI scripts to GJ:access my /dev/ttyS1 port. Any help on this matter would be greatly GJ:appreciated. you may have a permission problem. does the user your webserver runs as have permission to read from /dev/ttyS1? Probably not. How do I go about permitting Apache to see ttyS1? Bob's suggestion to use a wedge type scanner is the best option, but one that I don't have since the powers above won't buy me a new scanner, and I don't want to fork out my own cash since the program is for the college I work for ;-) Instead I have to use some old serial scanner that used to be connected to an Acorn! Perhaps, after I show them I can effectively use a scanner within the program they will buy some nice new wedge scanners -- Geraint Jones -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Barcode scanner CGI
On Wed, 25 Sep 2002 at 10:00, Geraint Jones opined: GJ:On Tuesday 24 September 2002 3:41 pm, fliptop wrote: GJ: On Tue, 24 Sep 2002 at 13:24, Geraint Jones opined: GJ: GJ: GJ:I'm trying to get the output from a barcode scanner into my CGI script. GJ: What I GJ:would like to see is the barcode going straight into a text box GJ: in my GJ:browser. I am using Device::SerialPort to read the output which GJ: works fine as GJ:a normal Perl script, but I don't know how to allow Perl GJ: CGI scripts to GJ:access my /dev/ttyS1 port. Any help on this matter would GJ: be greatly GJ:appreciated. GJ: GJ: you may have a permission problem. does the user your webserver runs as GJ: have permission to read from /dev/ttyS1? GJ: GJ:Probably not. How do I go about permitting Apache to see ttyS1? you just use chown like any regular file or directory. if your webserver runs as nobody, for example, you'd type (as root): chown nobody:uucp /dev/ttyS1 and that will give nobody access to read from the ttyS1 port. of course, i'm assuming your ports are owned by uucp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Barcode scanner CGI
Just as a warning some systems at boot check the ownership/permissions of devices in /dev and correct the problem children so all of a sudden after a reboot this may not work again, you might be pre-emptive, try rebooting (or take a walk through the init process) and if this is the case adding something in rc.local or the corresponding file on your system. http://danconia.org Geraint Jones wrote: On Wednesday 25 September 2002 10:46 am, fliptop wrote: On Wed, 25 Sep 2002 at 10:00, Geraint Jones opined: GJ:On Tuesday 24 September 2002 3:41 pm, fliptop wrote: GJ: On Tue, 24 Sep 2002 at 13:24, Geraint Jones opined: GJ: GJ: GJ:I'm trying to get the output from a barcode scanner into my CGI script. GJ: What I GJ:would like to see is the barcode going straight into a text box GJ: in my GJ:browser. I am using Device::SerialPort to read the output which GJ: works fine as GJ:a normal Perl script, but I don't know how to allow Perl GJ: CGI scripts to GJ:access my /dev/ttyS1 port. Any help on this matter would GJ: be greatly GJ:appreciated. GJ: GJ: you may have a permission problem. does the user your webserver runs as GJ: have permission to read from /dev/ttyS1? GJ: GJ:Probably not. How do I go about permitting Apache to see ttyS1? you just use chown like any regular file or directory. if your webserver runs as nobody, for example, you'd type (as root): chown nobody:uucp /dev/ttyS1 and that will give nobody access to read from the ttyS1 port. of course, i'm assuming your ports are owned by uucp. Thanks, that got it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Barcode scanner CGI
On Tue, 24 Sep 2002 at 13:24, Geraint Jones opined: GJ:I'm trying to get the output from a barcode scanner into my CGI script. What I GJ:would like to see is the barcode going straight into a text box in my GJ:browser. I am using Device::SerialPort to read the output which works fine as GJ:a normal Perl script, but I don't know how to allow Perl CGI scripts to GJ:access my /dev/ttyS1 port. Any help on this matter would be greatly GJ:appreciated. you may have a permission problem. does the user your webserver runs as have permission to read from /dev/ttyS1? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Barcode scanner CGI
-Original Message- From: Geraint Jones [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 9:25 AM To: [EMAIL PROTECTED] Subject: Barcode scanner CGI Hi, I'm trying to get the output from a barcode scanner into my CGI script. What I would like to see is the barcode going straight into a text box in my browser. I am using Device::SerialPort to read the output which works fine as a normal Perl script, but I don't know how to allow Perl CGI scripts to access my /dev/ttyS1 port. Any help on this matter would be greatly appreciated. Get a scanner that uses a keyboard wedge. Then barcodes scanned are seen by the PC as normal keyboard input. No special programming needed. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]