Re: PHP Uptime error

From: Date: Mon, 25 Jun 2001 10:48:12 +0000
Subject: Re: PHP Uptime error
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-55126@lists.php.net to get a copy of this message
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" <ceo@l-i-e.com> To: <php-general@lists.php.net> 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 richard@zend.com address is an endangered species -- Use > ceo@l-i-e.com > Wanna help me out? Like Music? Buy a CD: <Ɔ:[aO  > ªêîY8http://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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#55126) next »