Does anyone know if this is compatible with the newest version of phpBB? I can't get it to work.
I couldn't get session_begin to work unless I made the variable $user->id have escaped quotes surrounding it. So the user id passed to phpBB is "jordan" instead of just jordan. Once I did that, I had it print_r the array that session_begin returns, which is:
[user_lastvisit] => 1106955022
[session_id] => fe113a687fb49f1f84d7e71d6a9d268c
[session_ip] => 180cc395
[session_user_id] => "jordan"
[session_logged_in] => 1
[session_page] => 0
[session_start] => 1106955022
[session_time] => 1106955022
So it's clearly working, but then when I jump to the forum, I'm not logged in. Can anyone tell me what else I should do?
Ian OFriel - 2005-02-03 08:21:59 - In reply to message 1 from Jordan B
This is a strange one, i'm working on this at the moment, i started using this script and found I couldnt rely on it, so done things my own way for now, but as to the session cookie, once you have logged in and it shows the sessions ID, it doesn't seem to 'set' the session ID in the cookie ( forumname_sid ) at which point if you go to the forum, you are logged in.
Jordan B - 2005-02-28 17:03:25 - In reply to message 2 from Ian OFriel
I was wondering if you had any luck with this?
I've joined a thread addressing this issue at phpbb.com here: phpbb.com/phpBB/viewtopic.php?p=145 ...
My problem is not my forumname_sid, it's the userid. If you got userid working correctly let's swap code.
This code creates this cookie:
Here's what the cookie is when I manually log into the forum:
The only difference is the userid string...I think I'm handing it wrong because I hand
session_begin a string "Jordan" instead of an object, and you see it raw in the userid string,
though I tried handing it as an object too and phpBB didn't receive it correctly.