[K12OSN] PHP help

Toshio Kuratomi toshio at tiki-lounge.com
Mon Jan 23 20:35:49 UTC 2006

On Mon, 2006-01-23 at 14:00 -0600, Doug Simpson wrote:
> Hello all you PHP programmers out there!
> I have a program that I need to be able to run from inside a php script 
> that produces a web page.
> The program allows you to set the pins on the parallel port to high or low 
> based on commandline.
> Example:
> lptout 34
> will set datalines 2 and 6 high and leave the rest off.
> I need to be able to accomplish this with php.
> A web form asks for a number between 0 and 255 and passes it to the php 
> with a variable name "$bits"
> So, I should be able to use:
> system("lptout $bits" , $retval);
> and it should do the same as running from the commandline:
> lptout (bits) where bits is the number
> The commandline method works, but I can't do it in PHP. Anyone got any 
> ideas?
Does the lptout command actually get run by the php script?  Maybe the
PATH to lptout isn't correct.  Does it need to be executed as a certain
user in order to run?  Perhaps you have to use a setuid binary in this

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/k12osn/attachments/20060123/1b197a9f/attachment.sig>

More information about the K12OSN mailing list