I'm using authlib 1.94 and it does not work like i wan't it too.
I wan't to use this file structure (if possible) but there seems to be some problem with this?
./file_to_protect.php
authlib files goes here
./autlib_provider/1_02/
if I browse to
./autlib_provider/1_02/login.html
i can login and everything works just fine.
for example ./autlib_provider/1_02/edit.php works, and there this code is used for authentication:
require("backend.php");
$login_check = $mjb_authlib_provider->is_logged();
if (!$login_check) {
include("html/nologin.html");
exit;
}
BUT if i browse to ./file_to_protect.php
(which uses just about the same authentication code) I always get the message: Error : You need to login to request this page.
require("authlib_provider/1_02/backend.php");
//require("backend.php");
$login_check = $mjb_authlib_provider->is_logged();
$provider_id = $login_check[1];
echo $provider_id;
echo "login_check: ", $login_check, "<br>";
if (!$login_check) {
include("authlib_provider/1_02/html/nologin.html");
//include("html/nologin.html");
exit;
}
It seems ./file_to_protect.php only works like I want when it is located in the same folder as backend.php
But I don't want to put it there...
If you need more info, please let me know.
/Anders
PS You have probably noticed I've changed the authlib table-names. But this seems to work ok. =) DS