Giter VIP home page Giter VIP logo

Comments (7)

C4K3 avatar C4K3 commented on July 17, 2024

I don't know the specific solution or problem to that, but if you turn on debugging and write any errors you get, I'll try to help.

Also if you could write your php, phpbb, MySQL and mediawiki version.

Also are you sure you're using the latest version?

from mediawiki_phpbb_auth.

XnIcRaM avatar XnIcRaM commented on July 17, 2024

PHP 5.6.23 (cli) (built: Jun 22 2016 09:05:27)
MySQL: 5.1.73
phpBB 3.1.9
MediaWiki 1.27.0

In my LocalSettings.php for PHPBB_Auth looks like that:

# End of automatically generated settings.
# Add more configuration options below.
// PHPBB User Database Plugin. (Requires MySQL Database)
 require_once './extensions/Auth_phpbb.php';
 $wgAuth_Config['WikiGroupName'] = 'Skryba';
 $wgAuth_Config['UseWikiGroup'] = true;
 $wgAuth_Config['UseExtDatabase'] = true;
 $wgAuth_Config['MySQL_Host'] = 'localhost';
 $wgAuth_Config['MySQL_Username'] = '********';
 $wgAuth_Config['MySQL_Password'] = '*******';
 $wgAuth_Config['MySQL_Database'] = 'sameAsMediaWiki';
 $wgAuth_Config['UserTB']         = 'forum_users';
 $wgAuth_Config['GroupsTB']       = 'forum_groups';
 $wgAuth_Config['User_GroupTB']   = 'forum_user_group';
 $wgAuth_Config['PathToPHPBB']    = '../';
 $wgAuth_Config['LoginMessage']   = '<b>You need a phpBB account to login.</b><br /><a href="' . $wgAuth_Config$
 $wgAuth_Config['NoWikiError']    = 'You are not a member of the required phpBB group.';
 $wgAuth = new Auth_phpBB($wgAuth_Config);

MySQL database for phpBB and for MediaWiki is the same.
With config shown above when I try with my phpbb user and password I got message:

Auto-creation of a local account failed: Automatic account creation is not allowed.

when I set $wgAuth_Config['UseExtDatabase'] to false then I got php error:

[Mon Jul 18 11:11:59 2016] [error] [client 37.47.0.224] File does not exist: /var/www/MYSERVER/public/favicon.ico
[Mon Jul 18 11:12:05 2016] [error] [client 37.47.0.224] PHP Notice:  Trying to get property of non-object in /var/www/MYSERVER/public/w/extensions/Auth_phpbb.php on line 437, referer: http://MYSERVER/w/index.php/Strona_g%C5%82%C3%B3wna
[Mon Jul 18 11:12:05 2016] [error] [client 37.47.0.224] PHP Notice:  Trying to get property of non-object in /var/www/MYSERVER/public/w/extensions/Auth_phpbb.php on line 444, referer: http://MYSERVER/w/index.php/Strona_g%C5%82%C3%B3wna[Mon Jul 18 11:12:05 2016] [error] [client 37.47.0.224] PHP Fatal error:  Call to a member function prepare() on resource in /var/www/MYSERVER/public/w/extensions/Auth_phpbb.php on line 447, referer: http://MYSERVER/w/index.php/Strona_g%C5%82%C3%B3wna

from mediawiki_phpbb_auth.

C4K3 avatar C4K3 commented on July 17, 2024

With UseExtDatabase to false it seems to be having some problems connecting to the database, that's another issue I'll investigate later.

Now the auto-creation issue I was just able to replicate on my own wiki after upgrading to mediawiki 1.27. What I think is happening is that when a user (from phpbb) first logs into the wiki, they get inserted into the user table in mediawiki, and for some reason it's not being allowed to do this now. I have to leave irl right now, but I'll investigate later soon.

from mediawiki_phpbb_auth.

C4K3 avatar C4K3 commented on July 17, 2024

Found the problem, mediawiki 1.27 requires the permission autocreateaccount. I've opened #13 to fix this, until it gets merged you can update your Auth_phpbb.php with the one at https://github.com/C4K3/MediaWiki_PHPBB_Auth/blob/autocreateaccount/Auth_phpbb.php

from mediawiki_phpbb_auth.

XnIcRaM avatar XnIcRaM commented on July 17, 2024

Thanks you so much, now I can login on my wiki :)
I find two another issues but dunno if I should create new Issue or write it here... then I write it here :)

  1. When I use existing phpBB user but this user isn't in WikiGroup then I got message that my password is incorrect but I should get message defined in $wgAuth_Config['NoWikiError']
  2. When I use username that not exist in phpBB then I got message

The supplied credentials could not be authenticated.

when as I think it should be message defined in $wgAuth_Config['LoginMessage']

from mediawiki_phpbb_auth.

C4K3 avatar C4K3 commented on July 17, 2024

It seems the way it currently sets error messages has been broken in the latest mediawiki. The extension relies on the deprecated AuthPlugin interface, and really needs to be updated to use AuthManager instead to fix this.

from mediawiki_phpbb_auth.

Digitalroot avatar Digitalroot commented on July 17, 2024

Great feedback, Please open other issues for the message issues you found. Looks like it might be time for a rewrite to work with MW >= 1.27

from mediawiki_phpbb_auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.