Re: Is there a way to override safe mode to be able to read a etc/passwd file

From: Date: Sun, 23 Sep 2001 19:57:02 +0000
Subject: Re: Is there a way to override safe mode to be able to read a etc/passwd file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68450@lists.php.net to get a copy of this message
You'll have to routinely copy /etc/passwd into your own directory or something. The whole *POINT* of safe mode is to block actions like that... -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com 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 ----- Original Message ----- From: Richard Kurth <rkurth@pacifier.com> Newsgroups: php.general To: php <php-general@lists.php.net> Sent: Saturday, September 22, 2001 9:56 PM Subject: Is there a way to override safe mode to be able to read a etc/passwd file > How can I read the /etc/passwd file when safe mode is turned on. is > there a work around on this. Hear is a function I use to check if a > username is already in use on the system. This works fine when safe > mode is off but when it is on it gives this error. > Warning: SAFE MODE Restriction in effect. The script whose uid is 110 is not allowed to access /etc/passwd > owned by uid 0 in /home/sites/home/inc/function.inc on line 462 > Warning: file("/etc/passwd") - Success in /home/sites/home/inc/function.inc on line 462 > > > function pass() { > $pass=file("/etc/passwd"); > for ($i=0; $i<count($pass); $i++) { > $pwentries=explode(":",$pass[$i]); > if ($username == $pwentries[0]) { > print_error(" > <h2>The Username $Username is already being used on this system</h2> "); > exit; > }} > } > > > > > > > > > Best regards, > Richard > mailto:rkurth@pacifier.com >

« previous php.general (#68450) next »