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 [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
----- Original Message -----
From: Richard Kurth <[EMAIL PROTECTED]>
Newsgroups: php.general
To: php <[EMAIL PROTECTED]>
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:[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