Is there a way to override safe mode to be able to read a etc/passwd file
| From: | Richard Kurth | Date: | Sun, 23 Sep 2001 02:56:06 +0000 |
| Subject: | Is there a way to override safe mode to be able to read a etc/passwd file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-68387@lists.php.net to get a copy of this message | ||
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