On Fri, Jan 09, 2004 at 10:17:54AM -0500, Herbert Graf wrote: > > What is the device that's hooked up to the parallel port? If it is > > custom hardware then I guess the right way would be to write a kernel > > mode driver for it and access it from /dev. > > It's a parallel port web cam, > I didn't write the program, > therefore I can't write a device driver. OK. All of this is helpful. I presume that all of this works when you run from the command line right? > > > You mentioned something about image data. Is it a camera hooked up to > > the parallel port? Why not have the camera image saved some place on > > disk and have your script return the image file? > > Because it still has to run as root, which is what I'm asking about. The problem as others have pointed out is that the ioperm calls for direct port access requires root access. One techique that I've used in the past is to write a local network deamon that does the work then have the script call the deamon using netpipes. Since the daemon runs as root, it should have no problem picking up the camera. Another way to simplify this process is to have a deamonized script that simply snaps a current image over a certain interval. The your apache CGI can pick up whatever the last image snapped was. It should be no problem even if it's 15 seconds slow. Hope this helps, BAJ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.