[FrontPage] [TitleIndex] [WordIndex

This is a read-only archived version of wiki.centos.org

Convert Xoops+CBB(newbb) to phpBB

newbb_to_phpbb is a php script used to migrate the Community Bulletin Board (a.k.a newbb) into a phpBB.

1. Releases

2. Screenshots






3. Configuration

Before you could use this script, you need to configure some values. These values are set in the file config.php.


ATTENTION: In order to get a sucessful migration, id values should start at 1 in the following tables: xoops.bb_forums, xoops.bb_topics, xoops.bb_posts, xoops.bb_posts_text.


ATTENTION: In order to get a successful migration, the following tables are truncated before copying data into them: phpBB.forums, phpBB.topics, phpBB.posts.


ATTENTION: Newbb forum categories are not copied. In phpBB there are not forum categories.

4. Forums


The forum's order is controlled by the fields xoops.bb_fourms.left_id and xoops.bb_forums.right_id. If this fields are not properly set errors may happen.

5. Users


In our configuration, users are stored in an LDAP server. We use copy_Users() function to copy users from xoops.users table into our LDAP server. An example entry looks like the following:

    # al@example.com, people, example.com
    dn: uid=al@example.com,ou=people,dc=example,dc=com
    objectClass: inetOrgPerson
    cn: Alain Reguera Delgado
    mail: al@example.com
    userPassword:: e01ENX1QUDFEYVJtOE1RZldpNUV1NWtmelFRPT0=
    sn: Reguera Delgado
    uid: al@example.com
    uid: al
    displayName: al
    employeeType: writer
    preferredLanguage: en


ATTENTION: Any distinguished name (DN) in LDAP server, under the basedn, and equal to that one formed from xoops.users during the migration process, will be removed and replaced for the new one. Verify your LDAP users DNs before doing the migration.


ATTENTION: All records in phpBB.users.user_id > 52 will be removed in the user's migration process.


NOTE: All users will be inserted using the default phpBB group (REGISTERED). Once the user migration is complete, the phpBB administrator should reset user permission and define moderators.

When users entries are added into LDAP server they remain there available to be used as authentication credentials by phpbb system. At that moment if the LDAP authentication against LDAP uid and userPassword attributes is correct, the phpBB system inserts a new record for that user into the phpBB.users table if it found that the username_clean do exists for the uid provided. This way, it is established the relationship among phpBB.users and phpBB.topics and phpBB.posts.

Users can have more than one uid in its LDAP entry and can login into phpBB system using any of them. In that case a different user will be created in the database for each one used. In the example above user can login using al or al@example.com uid.


NOTE: This configuration was built with rfc2377 in mind. Additionally, it was added a second uid attribute (Ex. al) for those users whom don't want to be logged in with email address. Anyway this is something that could be discussed, so we could find a better configuration. When doing so, remember that users entries in LDAP sever may be used for other applications and that the directory may grow considerably.

When a user is removed from phpBB database it is only removed from phpBB database. No LDAP action is present here to remove the related user's entry from LDAP server.

If phpBB was configured to use LDAP server as authentication method, users will be able to log in as long as they be present in the LDAP server and no restrictive permission be implemented for it in phpBB system.

5.1. userPassword issue

Once the xoops.users information is copied into LDAP server, users' passwords need to be reset. This is because when user's password is copied into LDAP server it re-codified to fit format of the `userPassword' LDAP attribute and what is re-codified is not the user password itself but the hash of it.

To solve this issue the Resetting LDAP userPassword functionality is provided in this script. You need to run it once users are successfully copied into LDAP server. Basically, what this functionality does is generate a random password for each LDAP user and use the user's mail attribute to notify the user of its new password and the need of update it.

5.2. Manage LDAP user information

To manage LDAP user information, a web application should be provided, so the user can update its information. Also, to let administrator manage LDAP users easily.

6. Topics


Once topics migration is complete, all topics will be owned by the administrator user (phpBB.users.user_id = 2).

7. Posts


Once posts migration is complete, all topics will be owned by the administrator user (phpBB.users.user_id = 2).

8. Resynchronizing

After the overall migration process, it is convenient to resynchronize forums in phpBB using the "Administration Control Panel".

2023-09-11 07:23