First, I'm not trying to abuse the priority system. I do believe this is critical—at least for our site.
I am suddenly having an odd problem. All users, including Admin, are receiving Access Denied messages when attempting to post or reply to topics. Again, this even includes my Admin users. I have had everything working fine between Drupal and phpBB since setting both up.
The most recent changes that have occurred on my server: recompiling PHP5 with CURL support for the phpbbPostNode module. I have since disabled the phpbbPostNode module, but the problem persists. Do you think the PostNode module and CURL support have caused a problem with the forums? Again, it is the last addition/change I made to the server to enable topics to be started from node postings in the Drupal site. I can do without PostNode, but phpBB is mission critical for our site. I couldn't get PostNode to work properly, and enabling/testing the module immediately preceded reports of Access Denied.
Any help is greatly appreciated.
Thanks for a great module that has [so far] been a fantastic help to our site.
Comments
Comment #1
arkepp commentedThis sounds extremely site-specific.
Try a clean installation of Drupal 4.7 and phpBB 2.0.22 in parallel. If that works then its postNode, but I have no idea what the latter is or how disabling it works. If it's a typical phpBB mod then your best chance is to restore your files from backup.
Comment #2
bobwaycott commentedI run Drupal 5.1 and do not want to have to downgrade.
phpbbPostNode is a Drupal contrib module that posts a new topic in phpBB when a node is published via Drupal.
I think I'll check with the PostNode folks if they know of their module causing this kind of problem.
Comment #3
bobwaycott commentedhttp://www.site.com/forum/login.php?redirect=posting.php&mode=newtopic&f=3
Each time a user is logged in and clicks on a "new topic" or "reply" button, the above address is always output. The forum number changes at the end, of course. But every click sends the user back to phpbb's login page, which results in an access denied.
As far as I can tell, no editing has occurred regarding Drupal permissions. I am the only person who has administrative access to both Drupal and phpBB, so I am certain there has been no altering of the site's setup. The phpbbPostNode module has been disabled and the related db tables deleted. So it is a non-issue.
Now we are left with Drupal logins not being carried over to phpBB. This worked until three days ago without any hitch. So it being a 'site-specific' thing that requires reinstalling Drupal seems unlikely to provide a solution.
What can cause logins to not persist that I can take a look at?
Comment #4
demon326 commentedmy users are reporting the same problem i have a temp solution for it
let them clear the cookies of youre site and the browser cach that fixes the problem
Comment #5
arkepp commentedDemon326: I think you are describing the classic Drupal 4.7 / PHP 5.x problem, where the login box on the front page never disappears. I see that one constantly, but phpBB doesn't really notice, and it also happens without the module.
bobwaycott: Im not saying you should downgrade, Im just suggesting you do a parallel installation, either 4.7 or 5.1, to test whether PHP is broken. And if it still works, you can try introducing phpbbPostNode in the copy.
Beyond that you can clear the session table in phpBB, clear your cookies, then login through Drupal, check the SID in the data of the cookie in your browser, and compare with whats in the database.
Comment #6
bobwaycott commentedI really don't think php is broken. If it was, why would Drupal and phpBB continue to run? I have two other sites that run Drupal on this server that are not having any issues—and they are not running phpbb.
I cleared cache in all my browsers. I cleared cookies. I cleared the Drupal sessions table. I cleared phpBB's sessions and session-keys tables. Then I logged in to my Drupal site.
The session ids do not match in any of the three tables.
From cookies file (Firefox):
From Drupal sessions table:
From phpBB sessions table:
From phpBB session_keys table:
That is what the tables hold immediately after logging in. Once I click on a link to the forum, the phpBB sessions table adds a field that shows the session_id of the Drupal sessions table with my user_id. The phpbb session_keys table shows a new, different id. But phpBB still shows links requiring login and my Admin user (and other test users, as well as the site users) receives 'Access Denied' as well as no link to the Administrator Panel in phpBB or any forum moderating links and buttons.
I'm not sure how PHP could not be working. Nothing has changed. I have removed CURL support that was required by phpbbPostNode, and reverted back to the previous PHP build that is working fine for the two other Drupal sites running.
Any idea on what's going on here?
Comment #7
arkepp commentedThat looks about right. What user id is associated with the new session row in phpBB, after you request the first page in the forum? If it's your id then most stuff is working, if not then phpBB is ignoring the data cookie that contains your username and password (autologin).
I usually insert a ton of echo-statements to trace the execution of the session_start() in the includes/session file in phpBB.
Comment #8
bobwaycott commentedOnce I click over to the forum, the user id shows my currently logged in user. But it is not letting me administer, post, or reply.
Comment #9
bobwaycott commentedCan I double-check that I don't have faulty settings here?
Under Location of phpBB, I have
forum/(the directory 'forum' exists inside my drupal root directory)Under Absolute path to phpBB, I have
/forum/(the browser will reach forum at www.site.com/forum/)This is correct, yes?
I have tried disabling the phpbb module and then re-enabling it, to no effect.
Is there a way to reset it and re-sync users? I still cannot see how re-installing Drupal and phpBB will help here, cos the problem is in this site as it exists now. From what I understand via peligrorice, there is nothing left behind by phpbbPostNode now. So how can phpbb not be transferring login sessions over?
I have spent a ton of time customizing this installation of Drupal and phpBB with massive interface theming on both. I don't want to lose any of this work. Is there a way to save my users and re-import them so I don't have to ask them all to sign up again?
I know I can backup my databases, but that doesn't seem like it will actually help. It seems the problem is in the database somewhere, doesn't it? If I reinstall and just use an old database, I think I'm going to end right back here with the same problem.
What can you recommend if you don't know how to fix the login issue?
Comment #10
bobwaycott commentedAlright, here are some things I've tried I thought were interesting.
I disabled the phpbb module a second time. Deleted all browser session/cookie data. Cleared all sessions data and session keys from both Drupal and phpBB databases.
I went to my forum @ www.pubplanters.com/forum — clicked the 'Log in' link to log in to the forum. It takes me back to Drupal to enter my user/pass. I submit it, it takes me back to the forum, but I'm not logged in. If I click the 'Log in' link again, I am sent back to Drupal and receive 'Access Denied.'
Sounds the same, right?
Is it just me, or does it seem odd that I receive exactly the same behavior with the phpbb module completely disabled?
Shouldn't the behavior be different? With the module enabled, it is still behaving as if it weren't even there.
Any thoughts, arkepp?
Comment #11
arkepp commentedLocation and absolute location are correct as far as I can tell.
If you delete users in phpBB, they will be added the next time they log in if the module is active. I dont recommend doing that though, phpBB will get mad when it finds posts written by nonexisting users.
The behavior you describe is exactly what you would get if the module was not installed or, equivanlently, not creating sessions correctly.
As far as you have told me, your site was working, then you introduced two changes 1) recompiled PHP, 2) changed some code. Now it doesn't work anymore, and you don't know why. The biggest error you made was to make at least two major changes without testing in between. No backup copy to go back to?
Unless you do a clean installation, running on the same server (in a different directory and database, or use a different prefix for the tables) of both Drupal and phpBB, using my instructions, I think you are wasting our time. Verify that the module works with the clean installations. If it doesn't, it could be a bug or an error you are systematically making.
Then try readding the modifications that most likely caused the problem.
Comment #12
bobwaycott commentedFirst, where do you find that I have changed some code? I haven't touched any code. I enabled the phpbb module. Things worked fine. I enabled phpbbPostNode, it complained about curl support, so I added curl support to my server. That's it. I didn't change any code.
I have assumed that you have compiled PHP before. In case you haven't compiled from source before, if the compilation encountered some kind of error, PHP would not build successfully. So saying PHP is broken is wrong. PHP cannot be broken if it successfully compiles and works for every other item on this and two other sites that I host with Drupal. So let's cross broken PHP off the list.
Now, to check things out, I installed a new instance of phpBB for this site. I re-enabled the phpbb module and altered the settings to point to the new installation of phpBB at /testphpBB/. The fresh install works. The login carries over.
So the question is what does the phpbb module depend on that was somehow altered by phpbbPostNode? Or does the phpbb module not play nice with curl? Since curl is just http requesting, I don't see how curl can affect the phpbb module. Now, peligrorice says he is going to work on making phpbb and phpbbPostNode 'play together' for the next release. But saving my existing phpBB install is of utmost importance right now. Can I copy some specific table from the fresh, working install to the old install and save it? Neither phpBB install has any modules or extensions installed. It is a base install. The only thing I have done is customize the appearance (and I seriously doubt any thematic alterations can mess up the function of the board itself).
Comment #13
bobwaycott commentedIn combing through the config table of the forum's database, I noticed that allow_autologin was set to 0 instead of 1. I'm not sure why. It was the only difference between the tables of the existing install and the fresh one. I can only think that I perhaps accidentally clicked a checkbox wrong in the General Configuration page, thinking it was for another option.
Let's just keep in our heads that if anyone else ever experiences this, they might want to check this before being told PHP is broken or they need to reinstall everything. Hopefully I can save others the headache.
Comment #14
arkepp commentedEnabling postNode = loading module = changing code.
I rebuild several PHP installations on a regular basis. Just because the code builds doesnt mean it is not broken, it just means the syntax is correct in the eye of the compiler. Otherwise there would be no bugs in compiled software? Example: http://drupal.org/node/102114
A reinstallation takes 30 minutes the second time, and I am sure it also helped you find the answer because it gave you confidence the module is okay and it reminded you autologin had to enabled.
Comment #15
bobwaycott commentedAlright. Point taken. I didn't see modules as changing any code with phpbb.
I'm going to re-enable curl and phpbbPostNode and report back if they actually cause a problem with phpbb handling logins. If not, at least we'll know. I think I'm also gonna see about working with peligrorice on phpbbPostNode to test moving that module away from using a single signon for posting and make it accept users via permissions.
Maybe we can help everything play nicer.
Thanks again for your help and a fantastic module, arkepp. Keep up the good work.
Comment #16
arkepp commentedClosing due to lack of activity.