Author |
Message |
Admin32
Regular


Joined: Sep 14, 2003
Posts: 74
|
Posted:
Sun Sep 14, 2003 5:57 pm |
|
Hi Raven,
I would like to ask you a question since you seem to be the man for Php-nuke and phpbb problems.
I've installed PhpNuke v6.8 along with the supplied Phpbb (2.0.4) from nukecops. Everything works fine upto here.
I also happen to have phpbb2.0.6 running standalone, so I decided to import the contents of the forum into the one that came with phpnuke, and this is where the problem starts.
The importing is successful, but I then have the following symptoms:
1) New users who register for an phpnuke account cannot log in. In the case they do, the forum will not recognise them as previously loged in user and will not allow them to log in from the forum.
2) The users who were registered on the old phpbb forum, can log into the new php-nuke interface and post questions on the intergrated phpbb forum without a problem!
I am guessing there is something wired happening with user fields, but I am not sure.
I should note that I have tried importing the standalone phpbb before and after creating the "admin" user on nuke-php in case it was causing the problem, but to no avail.
I've been working for a solution for over a week and I haven't got far.
Can you please let me know what your opinion is and how it would be best for me to tackle the issue?
The import script I have used is from http://www.ruleit.co.uk/nuke.
Thanks in advanced. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sun Sep 14, 2003 6:38 pm |
|
You've done a great job of articulating your problem. Check a couple of things. My guess is that your auto-increment for user_id may be out of sync. Use phpMyAdmin and look at the nuke_users table and see what the next auto increment key is. Verify that it is at least 1 number higher than the highest user_id. Also, is there an anonymous user with a user_id of -1? |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 4:42 am |
|
Raven,
Thanks so much for your reply.
As requested, I have checked the auto increment field in the nuke_users table and this is currently set to "9", which is one number greater than the last user ID ( .
Furthermore, the user "Anonymous" exists, with a user id of "1".
I should note to you that I have not attempted to import the old "phpbb" database into this installation, therefore the above results are from a fresh php-nuke installation with 8 registered users.
Did you want me to import the old phpbb database and then check the relevant fields again? |
|
|
|
 |
Raven

|
Posted:
Mon Sep 15, 2003 6:21 am |
|
Unfortunately the import will not work correctly unless doen FIRST. I have used that script and found a couple of errors. But they involved the fact that the anonymous user was -1. If you would like to, export your stand alone phpbb database, zip it, and email it to me at raven @ ravenphpscripts dot com. I will try my script on it and see if I can figure it out. With my schedule and backlog, it may take me a week or so, but I'll see what I can do. |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 6:39 am |
|
Raven,
I have no problem emailing you the database, though I should note that I've tried importing the database first, without creating any users/admins in php-nuke, but the results were the same.
One minor detail that I didn't mention in order to keep things simple, but may prove important to you, is that the original phpbb database was exported from UBB 6.0.5. This export was successful without any problems, hence the reason I didn't mention it.
Could the problem's root be during the first export from UBB to PhPbb?
Let me know if your still willing to take a look at the database.
Cheers, |
|
|
|
 |
Raven

|
Posted:
Mon Sep 15, 2003 6:42 am |
|
Anything is possible. I need to see the database before I can make any reasonable (or unreasonable ) assumptions. |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 6:47 am |
|
Okay,
I'll be emailing you the database within the next hour at the indicated address.
If do you come to a conclusion, you can post it here since I'll be visiting quite frequently.
Thanks very much for your time and help. |
|
|
|
 |
Raven

|
Posted:
Mon Sep 15, 2003 7:27 am |
|
AHA! So the converted nuke_users DOES have the dreaded -1 entry. That is your problem, I am quite sure. I will get this corrected, hopefully later today, if not, tomorrow. |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 10:20 am |
|
Raven,
The database you have is slightly out of date. Besides the -1 ID, is there anything else that requires to be changed so I can do it myself.
The problem is that I currently have a clean installation oh php-nuke without the old phpBB database cause of the problems.
If the ID is the problem, then I can import the old phpbb database to the new nukephp installation and modify the ID field to what it should be.
Based on our discussions, I am guessing that the following actions need to be done in order to have a trouble free phpnuke database:
1) change the -1 ID field for the Anonymous user to 1
2)increment all other users by 1.
3) make sure the next available ID is greater by 1 number from the last ID used
Am I assuming correctly ? |
|
|
|
 |
Raven

|
Posted:
Mon Sep 15, 2003 10:33 am |
|
Only partly. And you can't modify existing id's because it will throw all the posting history off.
Basically, if I remember right, you need to do the following:
1 - Run the import script
2 - Change the -1 userid to 0 or (1 if 1 is not already used) in nuke_users.
3 - Using phpMyAdmin, change all poster_id from -1 to 0 in nuke_bbposts.
4 - Using phpMyAdmin, change all topics_poster from -1 to 0 in nuke_bbtopics.
I think that is it but like I said I have to research to be sure. Try that and if it doesn't work you've lost nothing but time  |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 10:38 am |
|
Got that,
In the case there are NO poster_id's and topics_poster that equal to -1, do I just leave them as they are ? |
|
|
|
 |
Raven

|
Posted:
Mon Sep 15, 2003 10:39 am |
|
Yes. You are only dealing with the -1 issue. Now if this still doesn't work, then you have a new issue that I am not aware of and will have to look into. |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 10:43 am |
|
Okies,
I'll get that done and update you on the results!
Thanks for the quick replies  |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 2:27 pm |
|
Oh boy...... I've at it since we last spoke raven and here are the results:
Changing all -1 fields didn't prove to be a good solution as it created heaps of other problems. So I decided to track down where the hell this -1 ID and the Anonymous user came from.
It seems like when you install phpBB (/phpbb/install/install.php) the installation inserts the above ID and user automatically and assigns it the -1 ID.
So, this is what I did.
1) Install phpbb
2) Using phpmyadmin, removed everything I could find that was relevant to the Anonymous user/ID, these were the tables that contained such data: phpbb_user, phpbb_groups, phpbb_user_group, phpbb_ranks.
3) impoted my UBB 6.0.5 database to phpbb, all okay.
4) using phpmyadmin, created the nukephp tables using provided sql script that comes with the package
At this point, checked for any -1 ID's, all okay. Also checked the Autoincrement field, which was correctly set (470 or something), one number greater than the last user ID.
Existing users in new phpnuke database log in correctly, phpbb forum recognises users, but when trying to post they get a "invalid_session" error.
New users can register and log in, phpbb will recognise them aswell, but will also get the "invalid_session" error when trying to post.
So, I got alot further than I've managed in the past 1 1/2 week!
How do you recon we can fix this error?
Oh .. and one last thing... the Admin user's posts now show up as "Guest", but thats a minor problem.
I'll be waiting to hear what you think about the above!
Thanks. |
|
|
|
 |
Raven

|
Posted:
Mon Sep 15, 2003 2:34 pm |
|
Something else must have happened, because I have convereted several sites using the aformentioned method. Let me work with what you sent me to validate the process and I'll be back to you later. |
|
|
|
 |
Admin32

|
Posted:
Mon Sep 15, 2003 2:38 pm |
|
Okies,
I'll be waiting for your results. If there is anything that is not clear, let me know so I can give you more details.
Let me remind you that the process I just described is NOT the same method I used to import the database I sent you earlier.
Thanks again! |
|
|
|
 |
Admin32

|
Posted:
Wed Sep 17, 2003 3:29 am |
|
Raven,
After spending more than 10 hours importing phpbb to phpnuke, I still haven't managed to successfully do it.
I noticed that php-nuke defaults to the following settings(after executing the nuke.sql script provided):
--------------------------------------
(nuke_users)
Anonymous user ID=1
(nukebb_user_group)
Group ID=1 User ID =-1
Group IdD=3 User ID=5
(nukebb_groups)
Group ID=1 Group type=1 Group name=Anonymous
Group ID=3 Group type=2 Groupe name=Moderators
--------------------------------------
From the above, my understanding is that the Anonymous user in nuke_users has an ID of 1.
At the same time, the nukebb_groups define group ID1 equal to the Anonymous user group. Therefore, the nukebb_user_group should contain a mapping between the two (nuke_user and nukebb_group), which it does, but seems incorrect to me as it maps groupd ID1 to User ID -1. Shouldn't that -1 be equal to 1 ? |
|
|
|
 |
Raven

|
Posted:
Wed Sep 17, 2003 4:01 am |
|
As I said in my earlier posts, the -1 is amost always the issue. I have not yet had time to address this but I haven't forgotten about it either. |
|
|
|
 |
Admin32

|
Posted:
Wed Sep 17, 2003 6:06 am |
|
Raven, I've managed to sort of get the imported forums to work.
The problem is that my "Admin" user, who has ID of 1, is now showing up as "guest"!
When looking into the nuke_users table, Admin has user ID of 1.
I just checked the last test post I made by looking into the nuke_bbposts table and it shows a "poster ID" of 1.
Any idea what the problem might be ?? It should "see" the user correctly.
If i can fix this small problem, then its all okay! |
|
|
|
 |
Raven

|
Posted:
Wed Sep 17, 2003 6:21 am |
|
Well, I know that anonymous should be 1 and superuser should be 2 in a default installation. I'm wondering if there is some absolute coding somewhere that is expecting a 1 to always be guest? |
|
|
|
 |
Admin32

|
Posted:
Wed Sep 17, 2003 6:30 am |
|
Hmmm .. then that could explain why all posts with user ID=1 are coming up as "guest".
Since anonymous is ID -1 and Admin has ID 1,
Can I get a script that will automatically convert all posts with Poster_id=1 to 2?, then I change the admin user to ID 2, and anonymous to 1 !
Will that work ? |
|
|
|
 |
Raven

|
Posted:
Wed Sep 17, 2003 7:16 am |
|
Conceptually yes. I don't have any scripts. I'm a DBA and I do most everything in the SQL window  |
|
|
|
 |
Admin32

|
Posted:
Wed Sep 17, 2003 7:26 am |
|
Raven, I exported the database via phpmyadmin and made the changes myself.
While uploading i got this error:
Error
SQL-query :
DATABASE test running ON server.siteserver.com CREATE TABLE `confirm` (
`confirm_id` char( 32 ) NOT NULL default '',
`session_id` char( 32 ) NOT NULL default '',
`code` char( 6 ) NOT NULL default '',
PRIMARY KEY ( `session_id` , `confirm_id` )
) TYPE = MYISAM
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database testing running on server.siteserver.com
CREATE TABLE
Any idea what the problem is ? |
|
|
|
 |
Raven

|
Posted:
Wed Sep 17, 2003 7:50 am |
|
If you are creating the table make sure it doesn'y already exists. You will have to DROP it if you are recreating it. If that's not the problem, try getting rid of all those tick marks |
|
|
|
 |
Admin32

|
Posted:
Wed Sep 17, 2003 2:17 pm |
|
Raven,
After 1 1/2 week's work (both here at home and at the office :>) and your valueable input, I have successfully managed to fix the problem !!!!
I made a few good notes on the Php-Nuke database right after its install script execution, noting the anonymous ID, group ID e.t.c, and then created the Admin user and noted his settings aswell.
I then imported the phpbb database, created the mess, downloaded the whole database and started the modifications, uploaded it and it worked without a hickup!
Thank you so much for your patience and time. I offer the same type of help to my visitors (network related) and you reminded me with your help how it feels to find somone on a forum thats willing to spend their time to help you!
I wish you nothing but success with your site!
Warmest Regards, |
|
|
|
 |
|