Does anyone know if it's possible to capture TCP_TIMESTAMP using a socket.

If you could do that you wouldn't need to execute /usr/bin/uptime

Andy.

---------------------------
Need a DHTML Menu?
Try www.milonic.com/menu it's free
---------------------------

----- Original Message -----
From: "Richard Lynch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 8:34 AM
Subject: Re: [PHP] PHP Uptime error


> > I have a PHP script with the following code in it;
> >
> > $uptime = passthru ("/usr/bin/uptime");
> >
> > but when I load the PHP page I get the following;
> >
> > 8:26pm up 0 min, 0 users, load average: 0.00, 0.00, 0.00
> >
> > which is wrong (I have checked the uptime via telnet).  Can anybody
please
> > help me try and fix this?
>
> When you checked uptime via telnet, were you logged in as "nobody", or
> whomever PHP runs as?...  If not, you haven't really duplicated the
> circumstances where PHP exists.
>
> I can't think why "nobody" wouldn'y be allowed to do "uptime", but maybe
> there's some security issue involved.  Too bad those load numbers aren't
> right though :-)
>
> You may have to resort to creating a suid shell script with some "real"
user
> as owner for PHP to be able to run it to do uptime.  See "man suid" for
> details.
>
> BE CAREFUL.  A mis-configured suid script is a security risk.  Actually,
> that's like saying a sucking chest wound is a "cut" :-^
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to