user login big/small problem :)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
meric_l
Forum Newbie
Posts: 3
Joined: Sat Aug 31, 2002 9:11 am

user login big/small problem :)

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

error message?
meric_l
Forum Newbie
Posts: 3
Joined: Sat Aug 31, 2002 9:11 am

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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/)?
meric_l
Forum Newbie
Posts: 3
Joined: Sat Aug 31, 2002 9:11 am

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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>
?
Post Reply