Page 1 of 1

user login big/small problem :)

Posted: Sat Aug 31, 2002 9:11 am
by meric_l
Hi guys, This is my Big/small problem.

I can login to various directorys by putting the line below as the beggining line in the index.php of various directories, and so a user can login, i.e each directory has its own username and passwd.
this is the line

<?php
require '/path/to/_restrict.php';
?>
and the user will login.

But now what I want is to have amain page whereby all users access one page and each user is directed to his/her directory or page

so I create login.php
and I made it like this
<?php

require '/usr/local/apache/htdocs/users/_restrict.php';
if (isset($_SESSION['psau'])) {
header ('Location: http://server.com/'.$SESSION['psau']);
exit;
}
?>

but this has failed , can someone p;se help me
thanx
Eriuc

Posted: Sat Aug 31, 2002 9:14 am
by volka
error message?

Posted: Sat Aug 31, 2002 9:21 am
by meric_l
Well the error message i get is that I dont have rights to access that page, actually when aperson logs in its like he is trying to access a page he is not supposed to access, and that where i get the no access rights...to any user, remember this is only when logging in to the login.php.

Posted: Sat Aug 31, 2002 9:49 am
by volka
is it the .htaccess-restriction or the file system permission error message?
and does $SESSION['psau'] evaluate to a file (userA/index.html) or a directory (userA/)?

Posted: Sat Aug 31, 2002 10:01 am
by meric_l
the access rights are the .htaccess-restriction rights,
This is the real error :You do not have access rights to this content
then the $_SESSION['psaun'] equates to the users directory, it can be USERA or /USERA/index.html

Posted: Sat Aug 31, 2002 10:50 am
by volka
please excuse that I insist on that question ;)
But I tried something similar and it worked.
In the error-log you have entries like
[Sat Aug 31 17:50:42 2002] [error] [client 127.0.0.1] client denied by server configuration: <some directory>
?