I've got authlib installed at http://www.fahrvergnugen.net/authlib/, and it's interacting with the database no problem. (try testing with username demo pwd. demo)
The problem I'm having is that it doesn't seem to be writing out the cookies to the browser.
I register, receive the e-mail, and authenticate my registration without problem.
When I go to log in, it verifies the username and password, and then admin.php tells me that I need to be logged in to view the page.
I changed nologin.html and added what I think is a functional bit of check code:
if (isset ($hello)) {
while (list ($name, $value) = each ($hello)) {
echo "$name == $value<br>\n";
}
}
else{
echo "Goddamned cookie isn't set.<br>\n";
}
And it returns with the cookie not set every time.
Hi!
I had a similar problem. Some Browsers didnt the cookie at all. I solved this by increasing the ttl for the cookie to more than 7200.
e.g.
setcookie("example", "$email:$hash:$id", time()+8000);
Maybe thats your problem?
regards,
spindi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I tried omitting the time entirely and leaving it a browser-session-only cookie, and this seems to have worked quite nicely. I'll try cranking the expire up a little bit and see what happens.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've got authlib installed at http://www.fahrvergnugen.net/authlib/, and it's interacting with the database no problem. (try testing with username demo pwd. demo)
The problem I'm having is that it doesn't seem to be writing out the cookies to the browser.
I register, receive the e-mail, and authenticate my registration without problem.
When I go to log in, it verifies the username and password, and then admin.php tells me that I need to be logged in to view the page.
I changed nologin.html and added what I think is a functional bit of check code:
if (isset ($hello)) {
while (list ($name, $value) = each ($hello)) {
echo "$name == $value<br>\n";
}
}
else{
echo "Goddamned cookie isn't set.<br>\n";
}
And it returns with the cookie not set every time.
So the scripts are interacting with the database.
In a fit of irritation, I wrote a quick cookie test script at
http://www.fahrvergnugen.net/authadmin/cookietest.php that writes 3 cookies then reads them back to you using setcookie(), and it works fine.
I'm at a loss. Help!
Doh. That should be:
http://www.fahrvergnugen.net/authlib/cookietest.php
Sorry.
Hi!
I had a similar problem. Some Browsers didnt the cookie at all. I solved this by increasing the ttl for the cookie to more than 7200.
e.g.
setcookie("example", "$email:$hash:$id", time()+8000);
Maybe thats your problem?
regards,
spindi
Well, I tried omitting the time entirely and leaving it a browser-session-only cookie, and this seems to have worked quite nicely. I'll try cranking the expire up a little bit and see what happens.