[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] PHP help



Uhhh. . . I lied. . . when I ran it as a non-root user, it returned:

Error: Couldn't get the port at 378

This is likely why. . . what to do about this?

Doug Simpson
Technology Specialist
DeQueen Public Schools
DeQueen, AR 71832
simpsond leopards k12 ar us
Tux for President!

On Mon, 23 Jan 2006, Toshio Kuratomi wrote:

> 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
> situation.
> 
> -Toshio
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]