AuthPhpBBUsersAndGroups
Questions answered on this page
How do I use a phpBB 3 database to authenticate users and groups for PmWiki?
Limitations
This page does not explain how to coordinate cookies/sessions between phpBB 3.0 and PmWiki. Users will be asked to log in separately to the forum and wiki.
Summary of Steps
- Download and install PmWiki. Tested with version 2.2.0-beta68.
- Download and install phpBB 3.
- Download the ADOdb Database Abstraction Layer for PHP and unpack into your cookbook folder.
- Download the Database Standard Recipe and place in your cookbook folder.
- Download the passwordhashing.phpΔ and authphpbb3.phpΔ and place in your cookbook folder.
- Edit your config.php file to include the required php files and settings
- Password protect pages.
Step 1
- Download Pmwiki.
- Follow the instructions for installation.
Step 2
- Download phpBB 3.
- Follow the instructions for installation.
Step 3
- Download the ADOdb Database Abstraction Layer for PHP.
- Unpack the files into your cookbook folder.
Step 4
- Download the Database Standard Recipe.
- Place the script into your cookbook folder.
Step 5
- Download passwordhashing.phpΔ and authphpbb3.phpΔ.
- Place the files in your cookbook folder.
Step 6
A. Add these database settings at the end of config.php, depending on your setup:
$Databases['phpbb_db'] = array( 'driver' => 'mysql', # what type of database? 'hostname' => 'localhost', # what hostname? ...localhost should work for most people 'database' => 'mydb', # what database? 'username' => 'myuser', # what username? 'password' => 'mypass'); # what password?
B. Add include_once("$FarmD/cookbook/authphpbb3.php");
after the above. Note the authphpbb3.php module is a replacement for the authuser.php recipe so do not include that file. If your database tables do not use the default table names (phpbb_users, phpbb_groups, phpbb_user_group) you will need to edit the queries in authphpbb3.php according to your setup.
Step 7
- Set security attributes for pages or groups by appending ?action=attr to an article or GroupName.GroupAttributes. Use id:PHPBBUsername or @PHPBBGroupName to limit to a particular user or group.
To use with non-latin usernames insert the following in authphpbb3.php after line 40 "if ($out !== TRUE) die($out);"
$DB['phpbb_db']->Execute("SET NAMES 'utf8';"); $DB['phpbb_db']->Execute("SET CHARACTER SET 'utf8';"); $DB['phpbb_db']->Execute("SET SESSION collation_connection = 'utf8_bin';");
Comments
See discussion at AuthPhpBBUsersAndGroups-Talk