PHP Classes

Has anyone tried this? Having Problem

Recommend this page to a friend!

      PHPBB Login Integration  >  All threads  >  Has anyone tried this? Having Problem  >  (Un) Subscribe thread alerts  
Subject:Has anyone tried this? Having Problem
Summary:Has anyone gotten this to work?
Messages:16
Author:Jordan B
Date:2005-01-28 23:36:52
Update:2007-06-07 04:03:40
 
  1 - 10   11 - 16  

  1. Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Jordan B Jordan B - 2005-01-28 23:36:52
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?
Thanks,
Jordan

  2. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Ian OFriel 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.

i'll post the URL for a demo later...

  3. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Jordan B Jordan B - 2005-02-28 17:03:25 - In reply to message 2 from Ian OFriel
Hi,
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:
PHPSESSID=9fc8f0e597bfed7df2f38a8b2b48ba20; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22
autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22
userid%22%3Bs%3A8%3A%22%22Jordan%22%22%3B%7D;
phpbb2mysql_sid=f93bb21135c9c2a4505d9cda6b3f8fa9
Here's what the cookie is when I manually log into the forum:
PHPSESSID=9fc8f0e597bfed7df2f38a8b2b48ba20; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22
autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22
userid%22%3Bs%3A1%3A%223%22%3B%7D;
phpbb2mysql_sid=f93bb21135c9c2a4505d9cda6b3f8fa9
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.
Thanks,
Jordan

  4. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Ian OFriel Ian OFriel - 2005-03-02 08:17:31 - In reply to message 3 from Jordan B
I ended up rewriting it from scratch as I found the phpBB Login class on here didn't quite do what it said on the tin...

  5. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of john fitz john fitz - 2005-06-09 13:21:25 - In reply to message 4 from Ian OFriel
Can someone please post something that will work on here plz or email me ?? thanks

  6. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Raymond Ø Raymond Ø - 2005-06-29 18:25:37 - In reply to message 5 from john fitz
anyone got it to work?!

  7. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of daniel far daniel far - 2005-09-28 07:27:52 - In reply to message 6 from Raymond Ø
Ian OFriel why don';t you share the cod that you got made from scratch? that would be nice..... we are sll stuck with this.. -_-

  8. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Neop Neop - 2005-10-20 04:37:31 - In reply to message 1 from Jordan B
I don't know about what or how you guys were implementing this, but the user->id being referred to in the sample is really the user_id in the phpbb_users table, NOT the username.

So you need the USER_IDs to be same in both tables (yours and phpbb) to make sure the script works. Oh, and you need to send in the user_id, not the username from you login script.

  9. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Wouter Wouter - 2005-11-28 11:38:54 - In reply to message 8 from Neop
It's User_id indeed! man I searched way too long for a class like this, but it works! many thanx!

  10. Re: Has anyone tried this? Having Problem   Reply   Report abuse  
Picture of Ricardo Ojeda Ricardo Ojeda - 2005-12-06 02:17:24 - In reply to message 9 from Wouter
i have the problem

db: can connect

 
  1 - 10   11 - 16