Print using a web server's print queues
Hi: This may be off topic. I have an application that uses an iPAQ to take physical inventory. The application works through the browser connecting via wi-fi to a Suse server running Apache (Suse 9.3). I need to print a summary to one of the print queues at the server, using a cgi written in C. I can write the printout to a file, and I thought I might be able to use the system command like: system ("lpr -Pprinter_name filename") but Apache will not run the system command. My only solution I can think is using a cron job that will print the files but maybe someone has a better solution. Any ideas? Thank you. -- Alfredo Cole-Tuckler
On Monday 16 October 2006 16:15, Alfredo Cole wrote:
system ("lpr -Pprinter_name filename")
but Apache will not run the system command.
What error does apache give? Have you tried running the command with the absolute path, e.g.: /usr/bin/lpr -Pprinter_name /path/to/filename ? -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
El Lunes, 16 de Octubre de 2006 12:11, stephan beal escribió:
On Monday 16 October 2006 16:15, Alfredo Cole wrote:
system ("lpr -Pprinter_name filename")
but Apache will not run the system command.
What error does apache give? Have you tried running the command with the absolute path, e.g.:
/usr/bin/lpr -Pprinter_name /path/to/filename
?
I get an EACCES error. I looked into SuExec but I can't figure out how to use it. Regards. -- Alfredo Cole-Tuckler
Alfredo Cole wrote:
El Lunes, 16 de Octubre de 2006 12:11, stephan beal escribió:
On Monday 16 October 2006 16:15, Alfredo Cole wrote:
system ("lpr -Pprinter_name filename")
but Apache will not run the system command. What error does apache give? Have you tried running the command with the absolute path, e.g.:
/usr/bin/lpr -Pprinter_name /path/to/filename
?
I get an EACCES error. I looked into SuExec but I can't figure out how to use it.
Regards.
Could it be that the apache user (usually apache, www or something similar) is not permitted to use CUPS? -- Regards, Aveek Bhattacharya IIT Bombay
participants (3)
-
Alfredo Cole
-
Aveek Bhattacharya
-
stephan beal