NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re: Safely running root commands

Hans Zaunere lists at zaunere.com
Fri Mar 4 20:34:32 EST 2005


> Okay, since you guys suggested I run my root commands from a daemon,
> I've been playing with that for the past couple of days.  I stole^W
> copied one of the perl daemons listed in "perldoc perlipc'
> (http://www.linuxnj.com/personal/qui_server.pl) and I used the sample
> PHP client from the website manual
> (http://www.linuxnj.com/personal/qui_client.php).
> 
> If I manually telnet to the daemon and give the commands "ls" and
> "quit", the daemon responds with a dir listing and quits. When I try to
> do the same thing via the PHP client, I get a dir listing and then it sits
> there.
>
> I've made every modification I can think of and nothing makes the PHP
> client work like the manual (telnet) client.  I Assume there is
> something about sockets I don't grok, but every example I've seen of
> this in different languages is what I have working manually.

The PHP link above doesn't seem to be alive so it's hard to tell without any code.  Probably an error in the way you're working with the sockets as you say.

H





More information about the talk mailing list