AuthPhpBBUsersAndGroups

Summary: Use phpBB3 user authentication and groups for PmWiki

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

  1. Download and install PmWiki. Tested with version 2.2.0-beta68.
  2. Download and install phpBB 3.
  3. Download the ADOdb Database Abstraction Layer for PHP and unpack into your cookbook folder.
  4. Download the Database Standard Recipe and place in your cookbook folder.
  5. Download the passwordhashing.phpΔ and authphpbb3.phpΔ and place in your cookbook folder.
  6. Edit your config.php file to include the required php files and settings
  7. Password protect pages.

Step 1

  1. Download Pmwiki.
  2. Follow the instructions for installation.

Step 2

  1. Download phpBB 3.
  2. Follow the instructions for installation.

Step 3

  1. Download the ADOdb Database Abstraction Layer for PHP.
  2. Unpack the files into your cookbook folder.

Step 4

  1. Download the Database Standard Recipe.
  2. Place the script into your cookbook folder.

Step 5

  1. Download passwordhashing.phpΔ and authphpbb3.phpΔ.
  2. 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

  1. 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