You'll have to routinely copy /etc/passwd into your own directory or

The whole *POINT* of safe mode is to block actions like that...

WARNING [EMAIL PROTECTED] address is an endangered species -- Use
Wanna help me out?  Like Music?  Buy a CD:
Volunteer a little time:
----- Original Message -----
From: Richard Kurth <[EMAIL PROTECTED]>
Newsgroups: php.general
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/ on line 462
> Warning: file("/etc/passwd") - Success in
/home/sites/home/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

PHP General Mailing List (
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