Can't login to Media Wiki .... external table error

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php|uber.leet Forum Index // General
View previous topic :: View next topic  
Author Message
RuffRhyno



Joined: 07 Sep 2008
Posts: 2

PostPosted: Sun Sep 07, 2008 3:11 pm    Post subject: Can't login to Media Wiki .... external table error Reply with quote
I can login to the forum but once I go over to the Wiki folder I'm not able to login, I get this error message.

Code:
 exception 'Exception' with message 'Unable to view external table
MySQL Error Number: 1146
MySQL Error Message: Table 'blott0_phpbb.phpbb3_users' doesn't exist

' in /home/blott0/public_html/wiki/extensions/Auth_phpBB.php:699 Stack trace: #0 /home/blott0/public_html/wiki/extensions/Auth_phpBB.php(505): Auth_phpBB->mySQLError('Unable to view ...') #1 /home/blott0/public_html/wiki/includes/User.php(609): Auth_phpBB->getCanonicalName('Blotterbug') #2 /home/blott0/public_html/wiki/includes/User.php(306): User::getCanonicalName('blotterbug', 'valid') #3 /home/blott0/public_html/wiki/includes/specials/SpecialUserlogin.php(385): User::newFromName('blotterbug') #4 /home/blott0/public_html/wiki/includes/specials/SpecialUserlogin.php(493): LoginForm->authenticateUserData() #5 /home/blott0/public_html/wiki/includes/specials/SpecialUserlogin.php(102): LoginForm->processLogin() #6 /home/blott0/public_html/wiki/includes/specials/SpecialUserlogin.php(17): LoginForm->execute() #7 /home/blott0/public_html/wiki/includes/SpecialPage.php(748): wfSpecialUserlogin(NULL, Object(SpecialPage)) #8 /home/blott0/public_html/wiki/includes/SpecialPage.php(534): SpecialPage->execute('wfSpecialUserlo...', NULL, Object(SpecialPage)) #9 /home/blott0/public_html/wiki/includes/Wiki.php(224): SpecialPage::executePath(NULL) #10 /home/blott0/public_html/wiki/includes/Wiki.php(55): MediaWiki->initializeSpecialCases(Object(Title)) #11 /home/blott0/public_html/wiki/index.php(93): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(WebRequest)) #12 {main}]


I am using a single database for both the forum and the wiki, but with separate database users. I have this defined in the LocalSettings.php, and I have altered the command that tells Mediawiki to look for an external database to false.

The odd thing is that last night after I got the forum and the wiki installed successfully, I was able to log into Mediawiki with the name. Now today, I'm not able to do so. I've tried tweaking several things in the LocalSettings.php but I'm not a programmer. Maybe there is some information I am skipping over.
Back to top
View user's profile Send private message
root
Site Admin


Joined: 24 Jun 2005
Posts: 471

PostPosted: Mon Sep 08, 2008 2:24 pm    Post subject: Reply with quote
It says

MySQL Error Message: Table 'blott0_phpbb.phpbb3_users' doesn't exist

Check and make sure the mySQL User you are using has access to blott0_phpbb.phpbb3_users
Back to top
View user's profile Send private message
RuffRhyno



Joined: 07 Sep 2008
Posts: 2

PostPosted: Mon Sep 08, 2008 6:49 pm    Post subject: Reply with quote
ok guys, I solved the problem. Basically, I mistakenly glanced over a bit of code that I hadn't edited to accurately find the location where my PHPBB was installed into...

Below is the code that you have to add to LocalSettings.php for the extension to work

Code:

// PHPBB User Database Plugin. (Requires MySQL Database)
require_once './extensions/Auth_phpBB.php';

$wgAuth_Config = array(); // Clean.

$wgAuth_Config['WikiGroupName'] = 'Wiki';       // Name of your PHPBB group
                                                // users need to be a member
                                                // of to use the wiki. (i.e. wiki)
                  // This can also be set to an array
                  // of group names to use more then
                  // one. (ie.
                  // $wgAuth_Config['WikiGroupName'][] = 'Wiki';
                  // $wgAuth_Config['WikiGroupName'][] = 'Wiki2';
                  // or
                  // $wgAuth_Config['WikiGroupName'] = array('Wiki', 'Wiki2');
                  // )


$wgAuth_Config['UseWikiGroup'] = true;          // This tells the Plugin to require
                                                // a user to be a member of the above
                                                // phpBB group. (ie. wiki) Setting
                                                // this to false will let any phpBB
                                                // user edit the wiki.

$wgAuth_Config['UseExtDatabase'] = false;       // This tells the plugin that the phpBB tables
                                                // are in a different database then the wiki.
                                                // The default settings is false.

$wgAuth_Config['MySQL_Host']        = 'localhost';      // phpBB MySQL Host Name.
$wgAuth_Config['MySQL_Username']    = 'blott0_phpbb';       // phpBB MySQL Username.
$wgAuth_Config['MySQL_Password']    = '*****';       // phpBB MySQL Password.
$wgAuth_Config['MySQL_Database']    = 'blott0_phpbbwiki';       // phpBB MySQL Database Name.

$wgAuth_Config['UserTB']         = 'phpbb3_users';       // Name of your PHPBB user table. (i.e. phpbb_users)
$wgAuth_Config['GroupsTB']       = 'phpbb3_groups';      // Name of your PHPBB groups table. (i.e. phpbb_groups)
$wgAuth_Config['User_GroupTB']   = 'phpbb3_user_group';  // Name of your PHPBB user_group table. (i.e. phpbb_user_group)
$wgAuth_Config['PathToPHPBB']    = '../phpbb/';         // Path from this file to your phpBB install.

// Local
$wgAuth_Config['LoginMessage']   = '<b>You need a phpBB account to login.</b><br /><a href="' . $wgAuth_Config['PathToPHPBB'] .
                                   'ucp.php?mode=register">Click here to create an account.</a>'; // Localize this message.
$wgAuth_Config['NoWikiError']    = 'You are not a member of the required phpBB group.'; // Localize this message.

$wgAuth = new Auth_phpBB($wgAuth_Config);     // Auth_phpBB Plugin.


Basically, towards the end of the code, the line that says this:

$wgAuth_Config['PathToPHPBB'] = '../phpbb/'; // Path from this file to your phpBB install.

The path was incorrect in regards to my PHPBB directory, I just changed it to this:

$wgAuth_Config['PathToPHPBB'] = '../forum/'; // Path from this file to your phpBB install.

Now, everything works great!

Thanks for the response Root, and I hope that this info can help anyone else who runs into this simple little oversite error.
Back to top
View user's profile Send private message
punjab



Joined: 03 Oct 2008
Posts: 4

PostPosted: Fri Oct 03, 2008 2:29 pm    Post subject: MySQL Error Message: Incorrect table name Reply with quote
Hi, I'm getting a similar error and I can't figure out why.
After I try to log in I get the following error message.
Quote:
Notice: Undefined index: wgPHPBB_UseExtDatabase in /home/kabaddi/public_html/wiki/extensions/Auth_phpBB.php on line 199

Notice: Undefined index: wgPHPBB_UserTB in /home/kabaddi/public_html/wiki/extensions/Auth_phpBB.php on line 276
Unable to view external table
MySQL Error Number: 1103
MySQL Error Message: Incorrect table name ''


line 199 reads
Quote:
if ($GLOBALS['wgPHPBB_UseExtDatabase'] == true)


and line 276 reads
Quote:
$GLOBALS['wgPHPBB_UserTB'],


I've tried changing this settings
Quote:
$wgAuth_Config['UseWikiGroup'] = true;
in the LocalSettings.php file to both true and false, but no luck.

I think it might have something to do with this setting
Quote:
$wgAuth_Config['PathToPHPBB'] = '../forum'; // Path from this file to your phpBB install.
just because the error shows a home directory, which I don't have. But to be honest I just don't have a clue

Please help
Back to top
View user's profile Send private message
root
Site Admin


Joined: 24 Jun 2005
Posts: 471

PostPosted: Fri Oct 03, 2008 2:38 pm    Post subject: Reply with quote
What ver of php and MySQL are you using?
Back to top
View user's profile Send private message
punjab



Joined: 03 Oct 2008
Posts: 4

PostPosted: Mon Oct 06, 2008 12:21 pm    Post subject: Reply with quote
Thanks for the super fast reply. Sorry I was out of town this weekend.

PHP version 5.2.5
MySQL version 4.1.22-standard-log
Back to top
View user's profile Send private message
punjab



Joined: 03 Oct 2008
Posts: 4

PostPosted: Wed Oct 08, 2008 5:07 pm    Post subject: Reply with quote
could it be that i have two user tables in my database?
one named mw_user and another one that I use for my forum named phpbb_users
I thought I had made the write settings in the LocalSettings.php file.

Quote:
$wgAuth_Config['UseExtDatabase'] = false;
(because the tables are in the same database)
Quote:
$wgAuth_Config['UserTB'] = 'phpbb_users'; // Name of your PHPBB user table. (i.e. phpbb_users)
$wgAuth_Config['GroupsTB'] = 'phpbb_groups'; // Name of your PHPBB groups table. (i.e. phpbb_groups)
$wgAuth_Config['User_GroupTB'] = 'phpbb_user_group'; // Name of your PHPBB user_group table. (i.e. phpbb_user_group)
$wgAuth_Config['PathToPHPBB'] = '../forum'; // Path from this file to your phpBB install.
Back to top
View user's profile Send private message
root
Site Admin


Joined: 24 Jun 2005
Posts: 471

PostPosted: Thu Oct 09, 2008 12:44 pm    Post subject: Reply with quote
What version of the plug-in are you using? I suggest re-downloading 3.0.3 and re-uploading the files from there. Also setup LocalSettings.php like the readme file suggests. Because wgPHPBB_UseExtDatabase is not valid anymore. I do not use it in 3.0.3.
Back to top
View user's profile Send private message
punjab



Joined: 03 Oct 2008
Posts: 4

PostPosted: Thu Oct 09, 2008 6:05 pm    Post subject: Reply with quote
Thanks a lot. I thought I had downloaded and installed 3.0.3 but I guess I hadn't. I think some of the code on the download link differs from the source code link in that brings you to this site.
Whatever it was, I did what you said and it worked. Thanks so much for your help!
Back to top
View user's profile Send private message
root
Site Admin


Joined: 24 Jun 2005
Posts: 471

PostPosted: Fri Oct 10, 2008 11:23 am    Post subject: Reply with quote
what links did you follow to get here? I'll see if I can update them.
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php|uber.leet Forum Index // General All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

alexisBlue v1.2 // Theme Created By: Andrew Charron and Web Hosting Bluebook
Powered by phpBB © 2001, 2002 phpBB Group