Webmastersite.net
Register Log In

PHPbb Integration Problem
How does the integration work?

Comments on PHPbb Integration Problem

mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
Posted Aug 09, 2006 - 11:27 AM:

Hello,

I searched the site for this issue and didn't find it so I pose the problem. On my test system, I did a completely clean install of phpbb2 v2.0.21 and WSN Links 3.40. Both of them installed correctly and without any problems. Both applications are installed in one database per the instructions I found here. I added test users to both and then logged into WSN Link and changed the integration setting in user to support phpbb, save the changes and it seemed to work correctly.

My expectation is that if I enter users into the phpbb2 system, they will be recognized and used by the WSN Links script. I can in fact log into WSN Links with a user from the phpbb database, but if I log into phpbb as a user, it does not auto log the user into the WSN Links program or vice versa, if I log into the WSN Links script, it does not auto log the user into the phpbb script.


So, the question is how is the "integration" suppose to work? I can not find any details about what the expected behavior is suppose to be.

Would appreciate a clarification about the proper behavior. I am running a dating script on one of my other sites and when you log into the main dating site program, it automatically logs the user into the forum as well and that is the behavior I expected but WSN Links does not appear to do the same thing, at least not the way I have it installed.

Any enlightenment is greatly appreciated,

mikesz
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 09, 2006 - 3:18 PM:

If I recall phpBB correctly, by default it doesn't set a cookie login unless you check a box telling it to remember you. If phpBB doesn't set a cookie then WSN Links will never be able to tell that someone is already logged in.

If you do wish to try to use phpBB cookies, make sure phpBB sets their scope to be available where you've installed WSN. Then look up their names and type them in integration/phpbb.php in the provided spots:

$idcookiename = '';
$passwordcookiename = '';
mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
Posted Aug 10, 2006 - 7:39 PM:

Thanks for the reply, Paul. Actually, I think I have it backwards, I was looking for my phpbb logged user to be auto logged into WSN Links as I am running phpbb2 plus as the engine for the site I want to use your program to collect links but I also need WSN Links to function independently to provide a "subscription" revenue stream for sponsored links and affiliate sites to support the site as well.

I think it is almost there but I am missing the piece to auto log the main site users.

thanks in advance for any suggestions.

mikesz
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 11, 2006 - 3:22 PM:

Go to your phpinfo (yourwsninstallpath/admin/index.php?action=phpinfo) and copy and paste what it has under "Cookie" in the "HTTP Headers Information" section. If there's something there that's from phpbb, it can be used. If there isn't, it can't until you make phpBB set it.
mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
Posted Aug 12, 2006 - 4:26 AM:

Thanks Paul.

I am missing some basic point here I think. I copy and paste the cookie information where? I did a clear cookies and refresh and I have three phpbb related cookies, phpbbmysql_ccip, phpbbmysql_data, and phpbbmysql_sid. The first one is for an IP tracker MOD I have installed. The second one contains the Autologin and the session ID. Am I suppose to put the "name" of the cookie only in the phpbb.php file or the whole string? I have tried it both ways and get the same result, no auto user log in when I redirect to the WSN Links page. Do you have an example of what that phpbb.php file is suppose to look like? Maybe that would help. thanks mikesz
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 13, 2006 - 3:45 PM:

"phpbbmysql_sid" sounds like phpbb is using sessions. Do you know what sort of sessions they are, what query is used to determine the member id when given a session id? You can specify a session query in the integration file -- see the drupal integration file for an example -- but since all session-using scripts work differently you have to figure out what query exactly your script needs.
mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
Posted Aug 13, 2006 - 9:07 PM:

Thanks for the update, I looked at the Drupal integration and it gets phpbb to use drupal to login etc. into phpbb. I have exactly the opposite requirement, I need to get WSN Links to use the phpbb login creditials for its access so that if the phpbb user is logged in, WSN Links knows, recognizes and can use that user login. I think you may be right about the sid cookie. Sorry, I thought you would have already had the solution to this issue when you posted "integration" in the features list for the product. That specifically was the reason I went with your product instead of PHPLD3. I guess we have different definitions of what "integration" means. Not a problem we can't solve, however.

I do have some other test results that are a little strange, when I used the example at the bottom of the help screen for autologinid and userid in the phpbb.php file, either way, calling them directly or as an array, neither method did an autologin and when I did a manual login as admin, it refreshed to the admin account screen and a few seconds later it redirected and booted me back out to the login screen.

Any comments?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 15, 2006 - 1:44 AM:

I looked at the Drupal integration and it gets phpbb to use drupal to login etc. into phpbb.

WSN isn't capable of altering drupal, and certainly WSN doesn't care whether drupal can use phpbb or not. I'm guessing you're looking at something that has nothing to do with WSN. I'm talking about integration/drupal.php, and I said "for an example", not to use, since I presumed you didn't have drupal.
mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
Posted Aug 15, 2006 - 2:41 AM:

Oh, I did misunderstand you. Sorry about that, I thought you we asking me to see how drupal was integrating with phpbb to get a clue about what I needed to do with WSN. That's a releif!

Okay, but practically speaking, I have only been trying to get WSN files to work and I don't understand the "resetting" when I point to the phpbb cookie like it describes in the manual and the phpbb.php file. The cookie phpbb2mysql_data contains the user name information and the phpbbmysql_sid has the password in it (at least on my system it does). When I plug those values into the phpbb.php file, it does not or is not recognized by the WSN login script. It still thinks that I am a guest and gives me the login box. When I plug in the username and password, it refreshed in the logged in screen but almost immediately kicks me out to the guest screen again.

So, I am wondering if WSN can actually use the phpbb credentials to autologin a phpbb user? Are you sure this has been done before? Do you have a written document or spec for how this "integration" is suppose to work? From what I can see here, it isn't working at all no matter what mode it is configured to be.


BTW, the live system that I have installed on it www.allaboutdatingsites.com. I have a hotlink on that portal page that points to the folder/directory (the left hand column has a "links" block that goes to the WSN folder). If you want to see how I have it setup, you can access it there.
mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
#10 - Quote - Permalink
Posted Aug 15, 2006 - 11:08 PM:

Hello Paul, Ok, I did some more homework with the cookies and compared to other apps that I am running, it does not appear that phpbb2 passes any password via any cookie. I think this is the problem you pointed out earlier. The issue with the "reset" maybe simply related to passing bogus data that WSN Links does not know what to do with it so it resets. I tried adding a setcookie to phpbb to capture the username and password but it just ignored it. BTW, WSN Links is using the phpbb2 user table and I can log in with any username that is set there, so that part of the integration is working, no problem. Do you know another way to "autologin" WSN Links that I could try to get this to work? Thanks for any suggestions.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
#11 - Quote - Permalink
Posted Aug 18, 2006 - 2:33 AM:

Drupal doesn't have a password cookie either, it's very much the same idea. As I was saying above, it's entirely possible to use a session id -- that's what WSN Links already does in order to integrate with drupal. However, of course, you're going to have to figure out how phpBB queries for the user id based on the session id, just as the drupal file includes that information for how drupal queries for the user id based on the session id. I would suggest asking on phpBB's forums, though I expect I could figure it out from a look at the sessions table of a phpbb database.
mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
#12 - Quote - Permalink
Posted Aug 19, 2006 - 10:23 PM:

Thanks for the update. If you create two wpn specific cookies for userID and password and include them in the phpbb sessions.php file, it works nicely but you have to also add a varible for $user_pw.

$user_pw = $userdata['user_password'];

setcookie('mywsnuser', $user_id, time() + 100000, '/', false);
setcookie('mywsnpass', $user_pw, time() + 100000, '/', false);

I added a function to reset the phpbb/wsn cookies to the wpn logout also to clear the cookie if the user hit the wpn logout button.

I am still testing it but it appears to work correctly.

I did notice a little weirdness with the wpn testcookie and the admin login as well as the "anonymous" user account but it disappeared when all my cookies expired and I have not seen it today in test.

thanks for the help. kindest regards, mikesz
nelgin


Usergroup: Customer
Joined: Jul 17, 2003

Total Topics: 39
Total Comments: 100
nelgin
#13 - Quote - Permalink
Posted Oct 02, 2006 - 5:00 AM:

Can someone sum this up then? Is it true that true phpbb/wsn integration does not work or is my config screwed up?

If a user logs into phpBB then they have to log in to wsnlinks.
If a user logs into wsnlinks they have to log into phpBB.

I notice that wsnlinks isn't writing a cookie when user logs in.

Also, I don't know if this is a problem, but my wsnlinks and phpbb are on different urls

www.british-expats.com/ for wsnlinks and
forums.british-expats.com/ for phpBB.

Any ideas?

Thanks,
Nigel
mikesz


Usergroup: Customer
Joined: Aug 09, 2006

Total Topics: 1
Total Comments: 10
mikesz
#14 - Quote - Permalink
Posted Oct 02, 2006 - 7:51 AM:

I thought from my last post that I had it working, well it seemed to work on my test system but when I went to my live system, it did not and does not work now for some reason even though I followed exactly what my procedure was on the test system. I need to go back over it again to give you a more definitive answer but at the moment it appears not to work in an integrated environment phpbb/wsnlinks.

Stay tuned, I need to get it fixed some way because I am in the same boat, two separate logins is not an acceptable option.

regards, mikesz
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
#15 - Quote - Permalink
Posted Oct 03, 2006 - 2:06 PM:

You have to set phpbb to use a cookie, which as I said way up there I don't think it does by default, it has some checkbox for it. If it doesn't use a cookie then it's impossible to integrate a non-existant thing. You also have to make the cookie accessible from both locations of course by setting the right path, whatever that might be for your relative locations. When they're on different subdomains the cookie domain would have to be set to .domain.com
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.