Hello,
I've been trying without success during two days to implement authmysql with a fluxbb forum.
On my local server (Wamp) I've installed the
version 1.5.6 of fluxBB , the admin username is oli_v_ier.
I've installed the last version of dokuwiki
2013-12-08 "Binky" , admin username : admin.
I've created the file /conf/local.protected.php , as recommended here :
https://www.dokuwiki.org/plugin:authmysql
<?php
// include config for MySQL backend
require_once('mysql.conf.php');
I've changed the
/conf/mysql.conf.php so it connect to the database of the forum (using the
global variables of fluxbb) :
define('PUN_ROOT', '../forum/');
include PUN_ROOT.'include/common.php';
$conf['plugin']['authmysql']['server'] = $db_host;
$conf['plugin']['authmysql']['user'] = $db_username;
$conf['plugin']['authmysql']['password'] = $db_password;
$conf['plugin']['authmysql']['database'] = $db_name;
Then I've replaced the first 3 statements with these below (the structure of the fluxbb tables is in the file joined to this message)
$conf['plugin']['authmysql']['checkPass'] = "
SELECT password AS pass
FROM pun_users
WHERE username='%{user}'
LIMIT 1";
$conf['plugin']['authmysql']['getUserInfo'] = "
SELECT
password AS pass,
(CASE WHEN realname IS NULL OR realname = '' THEN username ELSE realname END) AS name,
email AS mail
FROM pun_users
WHERE username='%{user}'
LIMIT 1";
$conf['plugin']['authmysql']['getGroups'] = "
SELECT g_title as `group`
FROM pun_groups AS g
INNER JOIN pun_users AS u ON u.group_id = g.id
WHERE u.username='%{user}'";
I've enabled the authentification system, with the admin pannel of the wiki :
- in "Manage plugins", I've activated the plugin
- in "Configuration Settings" : in the line Authentication backend I've selected 'authmysql' and defined oli_v_ier as superuser.
Test : ok, I'can connect to the wiki using oli_v_ier (fluxbb username), the link "Admin" appear in the upper right of the screen.
Problem : connexion lost when I change page in the wiki.
I've enabled the debug of authmysql, here's below what it tells.
I notice the two errors (note : randonnerforum1 is the name of the database), but are there linked to the connexion lost ?