Extension talk:PHPBB Auth

Issue with nicknames
To work around the issue mentioned for the usernames do the following replace:

(in which application?) `username` = \. $username. '\' LCASE(`username`) = LCASE(' . "'$username'" . ')

I think that this has been incorporated into Auth_phpbb.php,v 1.7 and that the Author of this work-around was meaning for Auth_phpbb.php to be edited. There is different code in v 1.7 however it does seem to address the CaSe issue:

// Clean $username and force lowercase username. $username = htmlentities(strtolower($username), ENT_QUOTES, 'UTF-8');

Please correct if wrong..

Underscore in nicknames
It took a while but I tracked down that if a phpBB username has an underscore (_) in it then this script won't pick it up and it will fail. Is there any way around that without changing the phpBB username? This is in MediaWiki 1.5 and Auth_phpbb 2.4. Raj Bhaskar 17:26, 4 March 2006 (UTC)
 * Yes! Please!!  This extension is a lifesaver, especially when multiple wikis are in play.  I'm looking at this for castlecops.com which has several staff groups some of whom would like their own "wiki section" to collaborate within the group.  Also it's a great solution to spam since there are good measures in place to prevent bot registration for example.
 * However there are over 100,000 registered users so, for instance, to write a script changing all underscores to something else and sending an email notification to any and all affected users would be doable I'm sure, it would be an administrative mightmare to deal with the inevitable "didn't get that email". How difficult would it be to change MediaWiki?  And why *does* MediaWiki restrict underscore characters?
 * --Ikester 20:56, 19 March 2006 (UTC)
 * I didn't manage using usernames with underscores, and Im using v2.4 of the Auth_phpbb with v1.6.2 of MediaWiki. Any idea? --Ring c 09:01, 10 April 2006 (UTC)

Non-English Characters in usernames
Most of my phpBB users are using Hebrew characters. The above solution isn't allowing such users to login. I get an error saying they're using an illegal name. Versions used are: MediaWiki v1.6.2 with Auth_phpbb.php v2.4. --Ring c 09:01, 10 April 2006 (UTC)


 * Could you try changeing the database fields to UTF-8 and then altering my SQL statements to use UTF-8? ~root 04/12/06


 * I'm afraid to touch those fields, we've just been through hell on our phpBB board after diacritic letters got corrupted one fine day. Following that disaster, we switched our entire phpBB board into UTF-8 on the webpages, and it's only the database collation that still remains at "latin1_swedish_ci", and I'm afraid to touch that setting. It's very likely the reason, though, why your extension does not work for any usernames with diacritic letters. (And most of our users do have diacritic letters in their usernames).


 * I'd first have to know what are the potential risks of changing those database fields to UTF-8. We don't want to spend weeks restoring our boards again...


 * So, for now, this forces us to go without your fine extension. :( And I'd like to support what the very first comment on this page says: it would be great if cookies between phpBB and MediaWiki could somehow be shared, so that after you log in to the board, you don't need to log in to MediaWiki too...


 * Music of the future, eh? --Faterson 22:18, 29 July 2006 (UTC)


 * Please see another description of the issue here.--Faterson 08:16, 12 August 2006 (UTC)

A Possible Solution is to Extend User.php as explained at Blitzed ? I haven't investigated it to conclusion yet.

User right management problems
Sorry, I didn't find a topic for this problem: I can't find some of my phpBB users in the user rights management ("Special:Userrights"). I can't find something unusual in the usernames and I can't find parallels between the names I can't find.

Different Databases for Wiki and phpBB
Can someone explain this? thx..

Modify the connect routine the following way and add an additional global $wgPHPBB_DBname containing the database name for the phpBB database. /**        * Connect to the database. All of these settings are from the * LocalSettings.php file. *        * {@source } * @return resource */       function auth_connect {           // Connect to database. $auth_conn = mysql_connect(                   $GLOBALS['wgPHPBB_DBserver'],                    $GLOBALS['wgPHPBB_DBuser'],                    $GLOBALS['wgPHPBB_DBpassword'],                    true) //This ensures the Auth Plugin to use another connection then the wiki (IMPORTANT!!!) or die('Unable to connect to external database: ' . mysql_error);

// Select Database: You can use different DBs for wiki and phpBB. mysql_select_db($GLOBALS['wgPHPBB_DBname'], $auth_conn) or die('Unable to open external database ('. $GLOBALS['wgPHPBB_DBname']. ' on '. $GLOBALS['wgPHPBB_DBserver']. ') ' . mysql_error);

return $auth_conn; }

Due some other troubles I had with the plugin modification I cannot document all minor changes in detail. --217.246.159.205 11:06, 4 September 2005 (UTC)

How about when the wiki and phpbb are on completely different servers? What can be done to support that?


 * I've edited the source above, because I later noticed it to still have some major issues. It now also allows for different servers for phpBB and your Wiki as you simply see in the source. This version now runs stable.

--217.246.160.102 12:23, 20 November 2005 (UTC) (BenBE)


 * @BenBE - The current release of the plugin. 2.2 Has native support for using another database/server for MediaWiki and phpBB. The above post was made long before I added support for it. Please check out the latest release for this feature. ~root 11/28/05

Different approach
I've tried your extension and the patch for the usernames listed above and still get a T_SRING error on line 181.

I thought about a different approach. What about hacking the phpBB2 files? Obviously this would take a little work and since I'm rather new at the whole mediawiki thing there are a few questions I'd need answered before even tackling this. Does mediaWiki use standard MD5 password encryption like phpBB2? Would inserting fields into the wiki user table disrupt it (it shouldn't)?

Anyway, what I was thinking is that if you could merge the phpBB2 user fields into the wiki user table then hack the SQL calls from phpBB2 to point to the wiki user table then you could use wiki as a frontend with outside links pointing to the appropriate forums. There would be no need to touch the wiki code unless you wanted to add forum links to the navigation bar or user bar.

I'd also need to study the structure of the databases a little more but solving the session problem would probably follow along the same lines.

BartVB


 * This won't be a problem with the (upcoming) phpBB3. With phpBB3 it's fairly trivial to use an external user database. This process is quite a bit more involving with the (current) phpBB2. It is possible though.

Banlist
FYI, this extension doesn't currently respect phpBB's banlist table. I tried adding this, but I don't have time (and my PHP knowledge isn't enough to do it quickly, tho it shouldn't be that difficult given what's already there in the extension). 193.60.75.86 13:55, 27 September 2005 (UTC)


 * This is true. I do not check the banned list. However the code (until todays release. 1.7 09/28/05) required the user to be a part of a wiki group. I assume that the site admin would not add banned users to the wiki group. ~root
 * OK but what if just the user credentials are used to allow/deny access to the wiki i.e. $wgPHPBB_UseWikiGroup  = false; ?
 * BTW, at castlecops.com we add a "!" (bang) character to the banned username. Could that be used to any advantage? --Ikester 22:09, 19 March 2006 (UTC)


 * You could change the auth function and do a strpos($username, '!') to search for banned usernames. ~root 03/21/06

Error on Version 1.9
Fatal error: Call to a member function on a non-object in /home/xxxxx/public_html/includes/SpecialUserlogin.php on line 314

The script seems to work but I get this error on first log in from a Phpbb account. If I refresh the screen, it goes away and it shows me logged it. After that, I can log in and use the phpbb account.


 * Update - More info is needed. What version of MetaWiki/PHP/MySQL are you using?
 * In my version of MetaWiki line 314 of SpecialUserlogin.php is part of the function mailPassword. Nothing in my code has anything to do with mailing a password so I do not know why you are getting that error. 10/04/05 ~root

Hi, here are the versions...

MediaWiki : 1.5.0

PHP : 4.3.11 (apache)

MySQL : 4.0.16


 * Update - The plugin only works with stable releases of MediaWiki 1.4.x ~root


 * I ran into the same problem running 1.5.4 and I think I found the problem. I think there's a bug in /includes/SpecialUselogin.php on line 301.  Right now it reads $u =& $this->initUser( $u ); but initUser is defined as function initUser(&$user) and doesn't return a referenece to the User object.  I think line 301 should be changed to read $this->initUser( $u ); ~ ThomW


 * Weird Error. If you check below the Plugin works with 1.5.x now. I do not know why you two are getting the error. I would hope these errors would be 100% across the board. I have yet to see this error. ~ root 01/13/06


 * I have this error too. It seems that may people do. There is a long discussion on the LDAP Authentication talk page. The error only occurs when a new users is logging in for the first time. If you want to reproduce the error try deleting a user from the MySQL user table and they logging in as that user. You will see the error.


 * OK I will and I will get back to you. ~root 03/21/06

Errors: Only variable references should be returned by reference
I am getting lots of the following errors on my login page after installing the phpBB edits to LocalSettings.php:

Notice: Only variable references should be returned by reference in /var/www/new/main/includes/ObjectCache.php on line 369 Notice: Only variable references should be returned by reference in /var/www/new/main/includes/SkinTemplate.php on line 136

If I remove the mods to LocalSettings.php the errors disappear. I tried this suggestion however as I am not a PHP guru I was not able to correct the errors.

If I ignore these errors (that appear on the HTML page) then I get another (seemingly unrelated) error that halts the progress of the authentication:

Notice: Only variable references should be returned by reference in /var/www/new/main/includes/ObjectCache.php on line 369 Notice: Only variable references should be returned by reference in /var/www/new/main/extensions/Auth_phpbb.php on line 115 Unable to view external table: 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 ''test' USING latin1 ) COLLATE l

I am using: Zend Engine v1.3.0, Apache/1.3.33 (Debian GNU/Linux) PHP/4.4.0-0.dotdeb.0, mediawiki-1.4.11, MySQL 4.0.24_Debian-10sarge

Suggestions appreciated.


 * Update - Having worked on this for a while longer the issue was the MySQL version number - updating my Debian Linux machine using apt-get has now fixed the problem (using 4.1 now). Incidently I have the above mod working with 1.5 Media Wiki - there did not seem to be any changes required. Thanks for creating this mod!

Single log on
I am also interested to know if there's a way to connect my board with my wiki so once a user is logged into the board, the wiki is logged in as well.


 * I have not done anything yet to support this. ~root


 * I think both the Mambo and Joomla! CMS' have extensions for single logins for the site ported to phpBB and MediaWiki respective. Although I haven't tried them (yet) myself, I guess they might be combined. ~Hans


 * It would be worth looking into. ~root 02/17/06


 * ....or if logged in at one wiki, that login is persistent to any other local wiki applying this extension to the same database. --Ikester 21:13, 19 March 2006 (UTC)


 * I was able to implement this with phpbb 2 and Auth_phpbb.php,v 2.2, I added it to the page


 * In your solution you say "I added these lines under $GLOBALS['wgPHPBB_UserTB'] = ...", but I cannot find a line like that in Auth_phpbb.php!!


 * Add it to the top of the page. I also had to change wfSpecialUserlogout to make $user_id global by adding it to the line "global $wgUser, $wgOut, $returnto, $userdata, $user_id;" Kembel 07:51, 18 October 2006 (UTC)


 * Same problem here. I get a lot of errors when I try to implement the Single Log On (SLO). I managed to log into the wiki with PHPBB-users that are members of the "wiki" group, but that's it :( Perhaps the SLO code doesn't work with this configuration (?):
 * MediaWiki: 1.7.1
 * phpBB 2.0.21
 * PHP: 5.1.2 (apache2handler)
 * MySQL: 5.0.22
 * I am very thankful for relevant comments!
 * Working quite nice, exceptyou use $auto in session_begin parameters, to determine whether the session should be remembered. $auto was undefined for me in MW 1.7.1, I needed to pass the mRemember value from Specialuserlogin.php, for it to work. --Miszobi 10:35, 18 October 2006 (UTC)
 * I added the line to the top of the page. Now I have this problem with $auto, could you tell me more about how you passed the mRemember?

Error on Version 1.10/2.1
When trying lo log in with a user e.g. called "Wikitester" that does not yet exist in the mediawiki-database

-> index.php?title=Spezial:Userlogin&action=submitlogin&returnto=Spezial:Listusers

I get this: Fatal error: Call to a member function on a non-object in ../wiki/includes/SpecialUserlogin.php on line 278

After refreshing the page the user is logged in an this error does not appears again. The Error comes only again when I delete "Wikitester" out of mediawikis database and try to login again.

The Error appears with setting $wgPHPBB_UseWikiGroup  = true; (phpBB2 user-group e.g. "TestWiki")

The Error even appears with setting $wgPHPBB_UseWikiGroup  = false; (all phpBB2 registered users)

plugin: 1.10 and 2.1

mediawiki: 1.4.9

MySQL 3.23.58

PHP 4.3.10 (apache)

phpBB2 2.0.17 with Categories Hierarchy Mod 2.12 (http://ptifo.clanmckeen.com/)


 * Update: This Plugin is not known to work with MySQL 3.x Some of the SQL queries I use probability do not work in MySQL 3.x ~root


 * I think it has to do with the Categories Hierarchy mod as I get the same error and use that same mod but have MySql of 4.0.16 --70.225.38.243 01:37, 10 November 2005 (UTC)


 * Sorry I have never run that mod. If you are able to find something I can change in the plugin to supress/fix the error. I will review and add it.

Need Help:
Need Help:  Login to http://uber.leetphp.com then click the Support on the main menu.

How about the other way round?
''I think it is safe to say all MediaWiki usernames are valid phpBB usernames. Not all phpBB usernames are valid MediaWiki usernames.''


 * In that case, wouldn't it be better to have phpBB use the Mediawiki user table? Also, one mediawiki user table can service multiple wikis (as it's currently doing on my development box), if that single database could service phpBB too it would be mightily cool! --Kingboyk 17:13, 13 January 2006 (UTC)


 * From what I have been told and have read phpBB3 will do what you are asking for. ~root 01/03/06


 * Thanks for the heads up. However, I can't find much of relevance on Google and phpBB3 seems to be a long way off. --Kingboyk 10:46, 16 January 2006 (UTC)


 * Sure, there is nothing keeping you from hacking phpBB to do this. It is open source. ~root 01/26/06


 * I'm anxiously awaiting PHPBB3, but in the meantime... maybe all authentication and user management could be done through mediawiki, and a seperate PHPBB user DB can be manually kept as a mirror of this database. When an account is created in MW, the same with PHPBB, when logged in the existing single sign on handles the PHPBB login. Seems like that would be less trouble than hacking PHPBB. I'm going to look into doing something like this. Kembel 06:24, 17 November 2006 (UTC)


 * Because I am an idiot can someone point me to a guide on how to do this? Preferably someway automatically though. ~Stringer

User Prefs
I've installed the extension, and everything works flawlessly. Even edited the /includes/templates/Userlogin.php to link to the appropriate 'Create Account' and 'password reminder' pages on our phpBB install.

But what about the Special:Preferences page? That still does display the "Change password" part. Is that a potential risk, and if so, how can I prefend that (don't show the "Change password" block)? ~Hans


 * I'm not sure how to change that w/o hacking MediaWiki. The problem with hacking MediaWiki files is that you have to hack it each release. ~root 01/26/06

Changes to the file "as-is"?
Do we just add the code on the content page "as is" to the file without having to change any values? 24.57.53.51 22:04, 11 February 2006 (UTC)
 * Step by step instructions can be found here PHPBB/Users_Integration ~root 02/17/06

Undefined property error - "BagOStuff.php" line 147
I get this error after installing this: "Warning: Undefined property: debugmode in /home/sites/site4/web/wiki/includes/BagOStuff.php on line 147"

It appears at the top of all pages. Anyone know what I missed?24.57.53.51 22:56, 12 February 2006 (UTC)


 * I wish I knew on this one. I think you posted on my site about having found a way around the error. ~root 02/17/06


 * I experience the same error on a WindowsXP System - is there a solution yet?


 * I found a solution that seems to work, but I don't know of the implication of this clumsy method: I just commented out, the following in the funtion _debug($text) around line 147 in BagOStuff.php making it:
 * /* if($this->debugmode)
 * wfDebug("BagOStuff debug: $text\n"); */
 * ... turning it into a "do nothing funtion" and the wiki works ...
 * (Oliver Walter)

Allowing MediaWiki login as well as phpBB auth
Is it possible to allow the wiki to use the phpBB username/password if they exist, but still allow the user to create an account only with the wiki? I tried changing $template->set('create',     false); to $template->set('create',     true); in the modifyUITemplate method but although this returned the appropriate UI fields, trying to create a new account failed. -- Raj Bhaskar 16:54, 12 March 2006 (UTC)
 * Yes there is. Change what you have above and also make the following changes.

function strict { return true; } // End: strict(


 * to

function strict { return false; } // End: strict(


 * Also change

$wgGroupPermissions['*']['createaccount'] = false; // MediaWiki 1.5 Settings
 * to

$wgGroupPermissions['*']['createaccount'] = true; // MediaWiki 1.5 Settings


 * ~root 03/13/06

Results of above
I tried the changes you specified above (assuming that the change to $wgGroupPermissions was in LocalSettings.php), but although that gave me the template for creating a new user, it still told me that I hadn't entered a valid username when I tried creating a new user. In case it matters, MediaWiki and phpBB are in different databases. Any further ideas? -- Raj Bhaskar 00:06, 18 March 2006 (UTC)


 * What you are asking can be done. I hoped a few setting here and there might give you what you wanted. However after thinking about how the whole thing works and seeing your error it makes sense that the steps I gave you would not be enough to solve your problem. With the release of MW 1.5 a whole bunch of new stuff was added to Auth.php I suggest taking a look at it and reading over what each function in the class does. Then read my notes I added to each function that explain what I did at each step and why.


 * There are whole function that I skip because they were not needed for what I am doing. (i.e. the addUser function) I also disabled some of what the Class is capable of. These things just don't fit my need, but I think they would fit yours.


 * You are welcome to stop by my site http://uber.leetphp.com and ask me any questions. I'll help where I can. ~root 03/21/06


 * Try this in Authphpbb.php:

function getCanonicalName( $username ) { return ucfirst($username);


 * I think I made another change to lose the 'invalid user' message too, but the above function will definately stop you.Kembel 06:34, 17 November 2006 (UTC)


 * Sorry I just realized the above will probably get you into trouble. I'm just in the process of making a mess of things to see how it all works, so my needs are probably different than yours...Kembel 06:39, 17 November 2006 (UTC)

Login rejection message if valid user but not in group
Would it be possible to advise user attempting login and who enters the valid credentials but isn't in the group of that fact? --Ikester 21:29, 19 March 2006 (UTC)


 * Yes, this would require knowledge of the MW internal error displaying system. It would also require a localized version of the error for all supported languages. ~root 03/21/06

Extension of group membership concept
I would like to use this extension for more than a wiki group. At castlecops.com we have several staff groups who sort out their issues within the group before making anything public. I'd like to offer a wiki section for each interested group who see a need for wiki group collaboration. So far so good (other than MediaWiki choking on the underscore).

However it would also fantastic to have a wiki for general staff use (i.e. membership in any number of forum groups). I'm wondering if $wgPHPBB_WikiGroupName could be made an array populated by allowed groups and having the appropriate function(s) in your extension checking each array element for a match.

Failing that, having a LocalSettings.php option to allow access if in any group except for the $wgPHPBB_WikiGroupName specified group (i.e. could be set to $wgPHPBB_WikiGroupName = '' ) might be useful.
 * --Ikester 21:49, 19 March 2006 (UTC)


 * Yes this could be done. Right now I use MySQL to check if the user is a member of the group and if they are it returns a boolean result. To make it an array its would probably be best to move the group match over to php and use array_search to find a match. ~root 03/21/06

Sysop privileges based on 'sysop' forum group membership
Would it be possible to assign sysop perms from a phpBB 'sysop' group membership? I expect that administering sysop perms over several wikis will otherwise be unwieldy. Not that this extension itself be modified, perhaps a similar extension though? --Ikester 21:59, 19 March 2006 (UTC)


 * Thats a great question and it would make sense to do so if you are trying to connect a bunch of Wikis together. Might be some kind of permission extension. Let me know what you find. ~root 03/21/06

MediaWiki 1.5.8 w/ MySQL 4.1.18-standard
Versions Error message Fatal error: Cannot instantiate non-existent class: auth_phpbb in /home/xxxx/public_html/wiki/LocalSettings.php on line 148 While line 148 reads: $wgAuth                = new Auth_PHPBB;     // Auth_PHPBB Plugin.
 * PHP 4.4.x
 * MySQL 4.1.18-standard
 * MediaWiki 1.5.8
 * Auth_phpbb.php 2.4

What have I done wrong? The only thing I can think of is that my users' table uses Hebrew encoding, while the rest (including wiki's tables) use LATIN1. Could this be the problem?


 * Update
 * Just something I wanted to emphasize - the wiki is shown in its txt version and the upper part shows this:

Auth phpbb.php From Meta Jump to: navigation, search

You can download this file from here http://uber.leetphp.com/Downloads/

There were issues with MediaWiki not displaying the source code correctly.

Download the code here. or View it here. Retrieved from "http://meta.wikimedia.org/wiki/Auth_phpbb.php"

Category: Authentification via other CMS

--Ring c 10:40, 6 April 2006 (UTC)


 * You need to download Auth_phpbb.php and put it in your extension dir. ~root 04/06/2006


 * I did already. I went through all the process, and yet no go... :( Ring c 11:08, 7 April 2006 (UTC)


 * Oh, what a foolish mistake!!! The problem was that I right clicked the Auth_phpbb link and chose "Save link as..." instead of simply clicking the link and downloading the zip file. argggghhhhhhh!!! Ring c 07:07, 10 April 2006 (UTC)

error
Hi,

I installed the phpbb_auth im my wiki on the website Oliv-Landy.org.

If I try to login with a phpbb account I get the following Error:

Error in numRows: Table 'usr_web336_1.watchlist' doesn't exist Backtrace: GlobalFunctions.php line 450 calls wfbacktrace Database.php line 543 calls wfdebugdiebacktrace User.php line 764 calls databasemysql::numrows User.php line 798 calls user::getnewtalk SkinTemplate.php line 268 calls user::getnewmessagelinks OutputPage.php line 467 calls skinmonobook::outputpage OutputPage.php line 680 calls outputpage::output Database.php line 400 calls outputpage::databaseerror Database.php line 347 calls databasemysql::reportqueryerror Database.php line 723 calls databasemysql::query Database.php line 645 calls databasemysql::select LinkCache.php line 162 calls databasemysql::selectfield Title.php line 1150 calls linkcache::addlinkobj Skin.php line 1289 calls title::getarticleid SkinTemplate.php line 182 calls skinmonobook::makeurldetails OutputPage.php line 467 calls skinmonobook::outputpage index.php line 270 calls outputpage::output

I use 2 databases one "usr_web336_1" for the phpbb and one "usr_web336_2" for the wikimedia.

It seems to me that after authenticating the user with the phpbb database "usr_web336_1" it does not switch back to the wikimedia database "usr_web336_2" and therefore the wiki can not read the watchlist.

Wikimedia has the version 1.5.8 and phpbb 2.0.19.

I would apriciate any help in this matter for the php_auth.

bye Oli


 * Try the 2.5 version of the plug-in and see if that fixs the problem. ~root 04/20/06

Allowing phpbb login AND anonymous login
So, I have the Phpbb users logging in just fine, but I'd like to allow them to login, AS WELL as allow for anonymous users (ie. someone who is not logged in at all) to edit as well. Anyone know if this is possible and what to do?

Thanks!


 * Yes it can be done.

// This requires a user be logged into the wiki to make changes. //$wgWhitelistEdit = true; // MediaWiki 1.4 Settings $wgGroupPermissions['*']['edit'] = false; // MediaWiki 1.5 Settings


 * Change this to true in your LocalSettings.php file.
 * ~root 07.03.06

Issue with custom groups
When this plugin is used, it is not possible to create other custom groups by setting permissions in localsettings.php. This is obvious if the plugin enforces things such that the users in the phpbb user group are the only ones to have access. However, it would be interesting to have this user group appear as a group in mediawiki itself or at least have the possibility of being able to set custom permissions.

--213.219.161.124 15:06, 10 June 2006 (UTC)


 * I've never messed around with custom groups. So I am not sure how to implement this. I do encourage you to share what you create. :) ~root 07.03.06

MediaWiki Upgrade Issue
When I tried to upgrade from MediaWiki 1.5.6 to MediaWiki 1.7.1 by running the upgrade.php script in the maintenance directory, I kept getting an error saying:
 * failed to open stream: No such file or directory in path /LocalSettings.php on line 123

That line is the one that says: require_once ( "./extensions/Auth_phpbb/Auth_phpbb.php" ) ;

After verifying that the file did indeed exist right where I expected it to, I tried running it from different paths, including the maintenance directory and the wiki root directory (where LocalSettings.php is), but to no avail. I didn't take a lot of time to troubleshoot what path the upgrade.php script is trying to use, but I fixed it by changing the line to the following: require_once ( "$IP/extensions/Auth_phpbb/Auth_phpbb.php" ) ;

I also had to change this line, #46, in the extensions/Auth_phpbb/Auth_phpbb.php script: require_once "./includes/AuthPlugin.php";

to: require_once "$IP/includes/AuthPlugin.php";


 * I would suggest removing the plug-in before running upgrade.php script. Then putting it back. I was able run Auth_phpBB.php on 1.7.1 without editing the Auth_phpBB.php code. ~root 12/08/06

Authentication the other way round
How would I get phpBB to authenticate its users against the MediaWiki user database? I have an existing website with a large Mediawiki community. I am now adding phpBB support to the site and require just the opposite functionality of what is covered on this page. Any clues?
 * It would be good to have such a capability. I suggest you ask at the phpBB web site though, since phpBB code would be affected, not mediawiki. -Ikester 18:47, 9 October 2006 (UTC)

Post Count Check?
Is there a way to have this plugin disallow login unless the user has X posts? 72.38.231.225 05:44, 6 November 2006 (UTC)


 * Yes but you have to think of it this way. Make a phpBB group called "wiki", set the requirement for joining the group to X many posts. From what I remember this can all be done in phpBB. ~root 12/08/06

Is there anyone also intending to integrat the WikiTimeScale into phpBB too
WikiTimeScale is a nice site to creat timelines, compared with Wikipedia, that's its strong point and it seems to harmony with Mediawiki nicely.

If it could shared with phpBB's usertable in MySQL, such like Wikipedia, that would be a nice thing for one who want to deal with knowledgemanagement.

So I hope my wish can be ture. --Roc michael 16:29, 16 November 2006 (UTC)

Problem: Changing phpBB password
I found a problem on my Wiki. When users changes their password on phpBB, the new password is not updated on the Wiki. Users can not log in with the new password. To log on the Wiki they have to use the old password. How can I fix this problem?

Thanks.


 * This really should not be a problem. With the plug-in installed the password field of in the user table for MW is never queried. Maybe something has changed in MW but I do not have the same issue. ~root 12/08/06

Login error in Mediawiki
I've installed a fresh phpBB and a fresh wiki, and both work fine. I also installed the integration-thing, and used all the standard options.

After that I made a usergroup called "wiki" and added two users to that group.

When I try to log on to mediawiki with one of the new user-accounts, I get the message: Login error:You have not specified a valid user name

The only account that works in the wiki is the original Admin-account, that was created after installing mediawiki.

What am I doing wrong?


 * I think you posted on my site about this problem and the fix was that your phpBB tables did not use the default prefix. So updating the the table names in LocalSettings.php fixed the issue. ~root 12/08/06

SYSOP Privileges
I saw the SYSOP section above, but I didn't see an answer for it. My question is a little different anyway. After installing the mod, I lost my sysop privs on my wiki. I still need to be able to administrate the wiki, what can I do?

Thanks


 * OK, I solved this on my own. My problem was that my phpbb username had a capital letter in the middle, and my wiki username did not (GotRoot vs. Gotroot, for instance). When I logged in for the first time after I installed the phpbb auth plugin, I lost my privelages because the wiki created a new account for me with what it considered a different user name. I went into the DB and added my new user ID# in place of my old user ID# for the Bureaucrat & Sysop fields, that fixed it. You can find instructions for this in the metawiki under the article promoting user rights, I think. Specifically, it talks about removing sysop rights manually, that is what gave me the idea.


 * I would however, like to see this plug in create accounts with Bureaucrat & sysop privs based on being in the 'wiki sysop' or 'wiki admin' groups, that way this kind of thing can be avoided regardless. If anyone knows how to do this, let me know. ;) Toastysoul 06:12, 7 December 2006 (UTC)


 * I love it when people are able to dig in and get their hands dirty in the database. :) I have no idea why but reading your post brought a smile to my face. I think the root of the problem is MW's naming convention. Someone posted about a phpBB add-on that would allow for stricter naming convention. While I can tell MW that Gotroot and GotRoot are the same guy and even auth the guy off the password, When it comes down to how MW stores the accounts in its own internal user table it thinks they are separate. And thus sysops does not carry over from one to the other. I hope that makes sense. I know in my head I understand the behavior and why it does it. I think MW has added some hooks into the account creation that maybe I can look into hooking into. ~root 12/08/06


 * Anyone know how to easily fix this? I dont have any moderators to my wiki now... And I do not find the "promoting user rights" anywhere. Is it just me who is unskilled in searching? A step by step guide would be gold :} /5 March 2007.
 * I fixed this, I searched for "User Rights" and found this: "Changing user groups manually in the database". Now I got my Administrator and Bureaucrats =) /5 March 2007


 * I found a quick fix for this problem using the advice above to manually provide Sysop rights to the database to allow one login to have the rights to use the following extension: Extension:Makesysop. One piece of advice to stop any head scratching is that you need a file called ExtensionFunctions.php which I found here  in order for it to function correctly.  /29 March 2007


 * I'm glad I could be of some help. I use the advice of others to solve problems so frequently, that it's a great feeling to finally give back. Has there been any progress on enabling sysop, or bureaucrat privs based on which phpbb wiki group you are in? Also, does the release of PHPBB3 have any significant database changes that will hinder the function of this plugin? Toastysoul 06:35, 2 May 2007 (UTC)

Mediawiki 1.9.0 - errors?
The extension used to work fine on MW 1.8.2, but now it doesn't on 1.9.0. Any ideas? Avonts 08:24, 17 January 2007 (UTC)


 * I'll look into a new version for 1.9. ~root 01/20/07

Doesn't work
After I've installed the integration of users between phpBB and Mediawiki (without any error messages), it doesn' seem to be working. I have to login seperately.

I have phpBB 2.0.22 and MediaWiki v. 1.6.8. Can anybody help?

I'v also met some problems on installing single login ,too. The way the above mentioned may produce a problem that you would see a webpage asking you to delete both folders "contrib" and "install". So I changed some lines in the file "./phpbb/common.php".

Please find the lines in the common.php. } if (file_exists('install') || file_exists('contrib')) {	message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib'); }

// // Show 'Board is disabled' message if needed. // if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") ) {	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information'); } ?>

Them replace than with the following:

} /* if (file_exists('install') || file_exists('contrib')) {	message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib'); }

// // Show 'Board is disabled' message if needed. // if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") ) {	message_die(GENERAL_MESSAGE, 'Board_disable', 'Information'); } ?>

And since I use UTF8 not latin with my MySQL database.

So I also change all the codes the followed FROM `'. $GLOBALS['wgPHPBB_UserTB']. '` WHERE `username` = CONVERT( _utf8 \'' . $username . '\' USING latin1 ) COLLATE latin1_swedish_ci LIMIT 1'; into the lines FROM `'. $GLOBALS['wgPHPBB_UserTB']. '` WHERE `username` = CONVERT( _utf8 \'' . $username . '\' USING utf8 ) COLLATE utf8_general_ci LIMIT 1'; I am not good at editing php code. The ways I did were by trying errors. There are still some error code taking place now. So I also had to switch the "display_errors" off in the php.ini file. But after I had done the work above I ran into another problem that PHPBB/Users Integration cann't work nicely with Hex2bit/Calendar
 * WIN XP
 * phpBB-2.0.20
 * MediaWiki v. 1.8.2
 * AppServ 2.5.7
 * Apache Web Server Version 2.2.3
 * PHP Script Language Version 5.1.6
 * MySQL Database Version 5.0.24a

--Roc michael 14:03, 24 January 2007 (UTC)

It cann't work nicely with Hex2bit/Calendar
Both Hex2bit/Calendar and PHPBB/Users Integration are good works.But they cann't work nicely together. After I finished the loging once extensions on my wiki, I found some error codes by adding evens in the Calendar. The error codes I saw were following: Warning: require_once(./extensions/Auth_phpbb.php) [function.require-once]: failed to open stream: No such file or directory in  C:\AppServ\www\mediawiki\LocalSettings.php on line 192

Fatal error: require_once [function.require]: Failed opening required './extensions/Auth_phpbb.php' (include_path='C:\AppServ\www\mediawiki; C:\AppServ\www\mediawiki/includes;C:\AppServ\www\mediawiki/languages;. ;C:\php5\pear') in C:\AppServ\www\mediawiki\LocalSettings.php on line 192 The line 192 is "require_once './extensions/Auth_phpbb.php';" And I couldn't fix them.


 * WIN XP
 * phpBB-2.0.20
 * MediaWiki v. 1.8.2
 * AppServ 2.5.7
 * Apache Web Server Version 2.2.3
 * PHP Script Language Version 5.1.6
 * MySQL Database Version 5.0.24a


 * Could anybody give me a hand.

--Roc michael 14:06, 24 January 2007 (UTC)


 * Try removing the ./ at the start of that file name part. --Dr DBW 03:34, 27 February 2007 (UTC)

Problem: mediawiki 1.9.0 and phpbb 2.0.22
I use this example: http://meta.wikimedia.org/wiki/PHPBB/Users_Integration

I got the following error message:

--- Set $wgShowExceptionDetails = true; in LocalSettings.php to show detailed debugging information. ---

But if I put this line into the LocalSettings.php I get the next error:

--- Backtrace:

---
 * 1) 0 /home/htdocs/mywiki/includes/SpecialUserlogin.php(311): User->setPassword('*****')
 * 2) 1 /home/htdocs/mywiki/includes/SpecialUserlogin.php(352): LoginForm->initUser(Object(User))
 * 3) 2 /home/htdocs/mywiki/includes/SpecialUserlogin.php(407): LoginForm->authenticateUserData
 * 4) 3 /home/htdocs/mywiki/includes/SpecialUserlogin.php(103): LoginForm->processLogin
 * 5) 4 /home/htdocs/mywiki/includes/SpecialUserlogin.php(19): LoginForm->execute
 * 6) 5 /home/htdocs/mywiki/includes/SpecialPage.php(625): wfSpecialUserlogin(NULL, Object(SpecialPage))
 * 7) 6 /home/htdocs/mywiki/includes/SpecialPage.php(431): SpecialPage->execute(NULL)
 * 8) 7 /home/htdocs/mywiki/includes/Wiki.php(183): SpecialPage::executePath(Object(Title))
 * 9) 8 /home/htdocs/mywiki/includes/Wiki.php(47): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 * 10) 9 /home/htdocs/mywiki/index.php(47): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 * 11) 10 {main}

Any ideas to solve this problem?


 * This issue is now fixed in release 2.6.0 ~ Nick 02/14/07

PHPBB 3.0.b?
Will this work with the PHPbb 3.0.b database? -- Mnyakko 16:27, 30 January 2007 (UTC)


 * Last I read phpBB3 will have native support for using an external database. So this plug-in will not be needed. ~ Nick

DynamicPageList and DynamiArticleList are not happy
My pagees show error messages that says "undefined variables" in the both extension files. Any suggestions? --Kohyin 11:09, 19 February 2007 (UTC)

PHPBB 3.0.B5 and Auth_PHPBB 2.6.0 issue
Hi

When I select the system to use the Groups table for authentication, it appears not to work, and disallows all logins.

I have followed the steps further up to set the script to UTF8, as that is what phpBB3 now uses, and when I tell it NOT to authenticate to the groups, it logs me in fine...

I have also manually ran each individual SQL Query within the function isMemberOfWikiGroup($username), and from what it returns, it SHOULD be returning TRUE, but when inserting die($faryMySQLResult['result']); as line 373, it displays the return value as FALSE.

Could the issue be related to the utf8 encoding, or the way the groups are managed in phpbb3?? Even though manually running each query seems to work fine...

System specs are:

Debian Sarge 2.6.8-3-k7 Apache 2.0.54 PHP 5.2.1-0.dotdeb.1 with Suhosin-Patch MySQL(I) 4.1.15

Cheers, Paul

[edit]

I have found a solution to this problem, albeit Dirty... The issue is because phpbb3 has Case-sensitivity in the username strings, so changing line 126 of the Auth_phpbb.php script from:

               if (md5($password) == $faryMySQLResult['user_password'] && $this->isMemberOfWikiGroup($username)){

To:

               if (md5($password) == $faryMySQLResult['user_password'] && $this->isMemberOfWikiGroup($faryMySQLResult['username'])){

Solved this issue, as it is now using the correct-case username extracted from the previous MySQL Query. I also can't see how doing this may affect security, for the simple reason, its calling the username as requested during login?

Fatal error when upgrading
As a note for others, there is an error that you may encounter when upgrading your version of MediaWiki. When running the update.php script, it reaches the "Deleting old default messages..." step (which does take a very long time I have found out ~ 10 minutes) and comes up with a fatal error: "Call to a member function addGroup on a non-object in maintenence/deleteDefaultMessages.php on line 19." Line in question is "$wgUser->addGroup( 'bot' );". This error is caused by this extension. Explanation by TimStarling is as follows: "scripts which need to act as a user will create a user object, in this case: $user = 'MediaWiki default'; $wgUser = User::newFromName( $user ); this will create a user object with no associated user row the maintenance script will then typically use the unauthenticated API to perform tasks, which means that blocks and permissions are ignored the authentication plugin in question is causing User::newFromName( $user ) to return a non-object, something which MediaWiki will only do if the username is not a valid title".

The solution is to simply remove the extension from the LocalSettings.php file when running the updating script. Simply comment out the lines. Then return when updating has finished. --Dr DBW 23:15, 27 February 2007 (UTC)

Illegal Characters in MediaWiki Usernames
I've done google searches and lots of reading, but every list I've found contains the dreaded "among others" or "and more" or something similar. Is there a definitive list of characters that cause problems with mediawiki? I have a small list derived from trial and error, but I just can't find the list of characters that need to be banned. Does anyone have a list? 134.134.136.1 18:28, 26 March 2007 (UTC) -JEEP

Memory Error
I had an old version of this script with Mediawiki 1.7

This evening I decided to upgrade to 1.9, I had to remove the settings for this script in LocalSettings.php for the MediaWiki updater to run, all seemed fine.

I downloaded and uploaded the new version of Auth_phpbb.php and reset the settings in LocalSettings.php for this script to work. However when I am using it, I get random memory limit errors all over for no apparent reason, and from no single php script (any will do it, it's sort of random).

Example

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3 bytes) in /home/xxxxxxxxxxxx/xxxxxxx/spud_wiki/includes/Xml.php on line 244

However the rest of my website works just fine (so the server having memory issues seems out of the question), and if I take the config settings out of LocalSettings.php the Wiki works fine, I put the settings back and this starts again.

Any ideas?

Work with multiple wikis?
I'm thinking I'd like to try this with multiple wikis -- the Farmer extension -- and wondering if each wiki could be assigned a parallel user group in the phpBB. Idea would be that I could create several wikis with the Farmer extension, something like: wikiA.mywiki.org, wikiB.mywiki.org, wikiC.mywiki.org... and then create phpBB user groups for wikiA, wikiB, wikiC...  Would users in those exclusive, conrolled user groups then have access to only those wikis with corresponding names?
 * Have you ever tried Extension:Read Restrict?--Roc michael 16:20, 6 May 2007 (UTC)

installation
Where to alter $fstrMySQLQuery ? includes/SpecialUserlogin.php ? Greudin

Compatability with phpBB3
With phpBB3 RC1 just released, just wondering if there are any compatibility issues with this extension and phpBB3. --Dr DBW 02:55, 21 May 2007 (UTC)


 * Yes there is a slight problem with the phpBB3. Because the new way the data is stored, there needs to be an additional step in converting the login, other wise when you try to access phpbb3 through mediawiki, it generates this error.


 * Unable to view external table
 * MySQL Error Number: 1267
 * MySQL Error Message: Illegal mix of collations (utf8_bin,IMPLICIT) and (latin1_swedish_ci,EXPLICIT) for operation '=' 05:22, 21 May 2007 (UTC)


 * Uhi, Usertabels have new names and new ordering, thats not easy...10:32, 21 May 2007 (UTC)


 * FYI, the developer has noted that when final version of phpBB3 is out, will update the extension so that it works with it. --Dr DBW 01:23, 22 May 2007 (UTC)

How stable is the solution in the article as discussed by szotsaki? Does it work with mw1.6.10? 130.88.136.190 13:38, 28 June 2007 (UTC)

Mediawiki 1.10
Does this work with Mediawiki 1.10? 69.251.122.53 03:36, 26 May 2007 (UTC)