Posted by Jonathan.D on May 11, 2008 at 4:30am
Jump to:
| Project: | phpBB Forum Integration |
| Version: | 6.x-1.0-beta3 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I have everything set up fine - all checks are green on Drupal and phpBB side. Yet for some reason I cannot login to either now. I have tried deleting all my cookies, all my temporary internet settings, cache, tried it from 3 different browsers but whenever I try to login to either site it either redirects me straight to the home page, or says "Access Denied" if I try to log in to drupal. Any suggestions? This sorta breaks the site.
Comments
#1
I think it is Drupal6 issue. Sometimes db table menu_router suddenly simple disappears. I also saw this issue without the module.
The cure is www.example.com/update.php
after $update_free_access = TRUE; in settings.php
#2
I tried the update.php. Didn't work. I'm really lost. phpbb said everything was working. I am POSITIVE i have installed it right. (done it four times now). I completely reinstalled my production site and everything worked fine. Except, for some odd reason, as soon as I activated the phpbbforum module and ran update.php again, I cannot log into either the forums or drupal on my developing computer. But i can log into the forums from a different computer, and I cannot log in to drupal no matter what.
I could really use some help.
#3
Try this
in phpbbforum.module
in function _phpbbforum_authenticate_user()
Temporally comment the line 2614
_phpbbforum_drupal_logout();
//_phpbbforum_drupal_logout();
Login to Drupal as admin and logout.
restore line
_phpbbforum_drupal_logout();
and try login again.
Let me know.
#4
Thanks, vb! This seemed to do wonders.
With it commented out I could login to the main drupal site and when I flipped over to the iFramed forums it would be automatically logged in (as I think you meant for it to do). This didn't happen before. Everything seemed to work perfectly with it commented out, logging in and out and the sync between drupal and phpbb.
With it restored, nearly no difference. Though after a couple of minutes of logging in and out I noticed sometimes I wasn't able to log in from Drupal, but was able to log in on the forums and have it sync to Drupal.
It's a tricky process, but I think you've done well. Especially if phpbb is in an iFrame. Maybe on future updates it would be possible to add a little ajax to update the menu module to tell it that the user is logged in (and thus not confusing the sync process); or having the phpbb in a node, sacrificing load times for compatibility. Just suggestions; I haven't a clue how irritating they would be to implement.
Over all, that helped tremendously, thanks again.
edit: upon further 'testing' with _phpbbforum_drupal_logout() is restored I cannot login to the admin control panel on phpbbforum. It constantly asks me to reauthenticated myself. Also, when it is commented it goes back to normal (i.e. I cannot login to anything). If it would help I can post the log files.
#5
>I cannot login to the admin control panel on phpbbforum
It is not the normal and i have never seen this before, it looks like cache problems.
If you see something strange, you should first logout both from drupal and phpbb and clear all caches, sessions in phpBB, in browser, in Drupal.
And repeat again. First login after clearing may be unsuccessful, repeat.
In the last dev version there are the constants that helps you with disabling and enabling _phpbbforum_drupal_logout()
define('PHPBB_DISABLE_AUTO_LOGOUT', 0);
and
define('PHPBB_DISABLE_MODULE', 0); // to disable module at all in emergency
#6
Thanks, those might come in handy.
Still, though, my logins don't seem to 'stick'. Either it kicks me back to the main screen, I will see the user/1 or whichever user I use, then once I try to go to /admin it logs me out again. For phpbb the same things happens. Either it will say, "you have been logged in" and then once I proceed it says I am not logged in again. Or if I click logout before it redirects me to the main page it will say, "you were not logged out because your sessions do not match." so something is definitely up.
#7
I've had this issues too with beta5, and still am not sure if it is all fixed. I believe it has to do with the cookie settings for Drupal/phpBB, changing those so they match exactly (see Drupal's settings.php to force a cookie domain) seems to make it work for me (that, and removing cookies from the browser once so that old cookies do not override any newer ones).
#8