Skip to:
Content
Pages
Categories
Search
Top
Bottom

A phpBB to bbPress database converter


  • Anonymous User 133554
    Inactive

    @anonymized-133554

    Hi!

    I switched my site’s phpBB forum to bbPress, and I’ve released the script I used for this purpose under the terms of the GPL.

    It’s largely based on the excellent starting point from Bruno Torres, to which I added some new features — like bbCode conversion with clean XHTML 1.1 compliant output, smily to text transcription, and the ability to import topics marked as closed, sticky and announcements as such.

    I made also some little bugfixing, and the resulting script was able to cleanly import almost everything valuable from my old phpBB database.

    You can have a look here if interested: http://www.iteisa.com/phpbb2bbpress/

    Hope it helps to spread bbPress and web standards all around! ;-)

Viewing 25 replies - 26 through 50 (of 56 total)
  • One problem I ran into was that I already had a few existing users on the wordpress side, which led to conflicting unique user IDs. I got the importer to work, but some of the posts were under the wrong user names b/c of conflicting unique user IDs between wordpress/bbpress and the old phpbb board I tried to import.

    I haven’t been able to try it yet (phpbb.com is down), but they have a mod called Change User ID that seems to do exactly what its name suggests. If so, I intend to use it to change the three user IDs that are conflicting from 2, 3, and 6 to 99992, 99993, and 99996 respectively. That way, when I import the phpbb tables there will just be “blanks” in the sequential unique user IDs for the existing wordpress IDs to fit into.

    Hope this is helpful…

    Thanks for this great script. Unfortunately I got myself suspended from one of my webhosts since it clogged up the MySQL queue :) But I have only myself to blame, and they did let it pass only giving me a final warning.

    I know this topic is pretty old, but I have a problem … I converted members and forums succesfully, but topics and posts didn’t show up. I got these errors when converting:

    #

    Warning, there was an error with the following query

    #Exporting Topics: INSERT INTO bb_topics (topic_id, topic_title, topic_poster, topic_poster_name, topic_last_poster, topic_last_poster_name, topic_start_time, topic_time, forum_id, topic_status, topic_resolved, topic_open, topic_last_post_id, topic_sticky, topic_posts, tag_count) VALUES ( 4, ‘Pravila!’, 2, ‘Zala’, 2, ‘Zala’, ‘2007-02-13 16:13:01’, ‘2007-02-13 16:13:01’, 1, 0, ‘no’, 1, 765, 0, 2, 0)

    Unknown column ‘topic_resolved’ in ‘field list’

    And a lot more of them. I don’t know much about php really, so I have no idea what is wrong. It’s probably a stupid mistake I made, but I don’t know what it is. Help me, please?

    The topic resolved thing is probably because that was written for an older version of bb which had that in it by default. I think installing the forum support plugin will add that column, worth a shot anyway?

    https://bbpress.org/plugins/topic/16?replies=7

    Otherwise you could edit the php file and remove the bits about the topic_resolved column (remember to back up the original file in case it doesn’t work!).

    Hi all I also get an error on like the one experienced above:

    Fatal error: Call to undefined function: file_put_contents() in phpbb2bbpress.php on line 383

    Can anyone tell me how I can resolve this.

    I also notice that this converter has not been updated, is it going to be anytime soon?

    AND whilst converting WHY does it STATE that all emails are being forwarded to SPAMMERS? (Can’t remember the exact words). Is this meant to be a joke?

    Thanks in advance.

    ok I’ve even tried version 0.73 but still encountering errors. Can anyone help?


    citizenkeith
    Participant

    @citizenkeith

    I just tried this using phpBB 2.012 and bbPress 0.8.3.

    This is the error I get:

    Table ‘khanlon_db3.henskebb_users’ doesn’t exist

    And that makes sense, since I already set up bbPress to integrate with WordPress. Since bbPress is using the wp_users table, the script doesn’t know where to put the phpbb users.

    As it stands now, bbPress shows all the topic counts for each forum, but when you click on the forum, none of the threads are listed.

    I tried exporting all the users using phpMyAdmin and importing into the WP table, but the threads are still missing.


    citizenkeith
    Participant

    @citizenkeith

    I just reinstalled bbPress and did NOT utilize WP integration. I also tried using the forum support plugin, as recommended by fel64.

    Now I’m getting this error:

    Unknown column ‘topic_resolved’ in ‘field list’


    citizenkeith
    Participant

    @citizenkeith

    I removed “topic_resolved” from the script. A fresh install later, and I get this error: “Column count doesn’t match value count at row 1”


    grenoli-dk
    Member

    @grenoli-dk

    I am having problems with the phpbb2bbpress converter (http://www.iteisa.com/phpbb2bbpress/).

    When I run the file I just get this message. There isnt a sql-file to download or a file created on my server.

    1: I downloaded the file from: http://www.iteisa.com/phpbb2bbpress/

    2: I edited the lines I have written in bold.

    Code:
    define(‘DB_PHPBB_USERNAME’, ‘[strong]databasename[/strong]’);
    define(‘DB_PHPBB_PASSWORD’, ‘[b]databasepassword[/b]’);
    define(‘DB_PHPBB_DATABASE’, ‘[b]databasename[/b]’);
    define(‘DB_PHPBB_TABLEPREFIX’, ‘phpbb_’);

    define(‘DB_BBPRESS_HOSTNAME’, ‘localhost’);
    define(‘DB_BBPRESS_USERNAME’, ‘[b]databasename[/b]’);
    define(‘DB_BBPRESS_PASSWORD’, ‘[b]databasepassword[/b]’);
    define(‘DB_BBPRESS_DATABASE’, ‘[b]databasename[/b]’);
    define(‘DB_BBPRESS_TABLEPREFIX’, ‘bb_’);

    I only have one database on my server, so the databasename and password is the same on the phpbb and bbpress part

    Code:
    define(‘EXPORT_TO_FILE’, true); // Should the converted DB be exported to a file ?
    define(‘FILENAME’, ‘/tmp/phpbb_imported.sql’); // Which one ? (Ensure this path is writeable by the server)
    define(‘AUTO_IMPORT_EXPORTED_DATA’, false); // Should the script automagically import the converted DB ?

    3: I created the folder tmp at the root and used chmod on it.

    4: I uploaded the file to the root and tried to open it but I couldnt. So I removed the s in .phps and it worked. But i only got this message – but nothing really happened. I cant download a file, and there is nothing on my server. What am I doing wrong?

    Q! wrote:
    phpBB to bbPress database converter

    This script can convert a PhpBB 2.0.X (www.phpbb.com) forum database to bbPress “Bix” 0.73 (www.bbpress.org) format.

    Developed by Jaime GÓMEZ OBREGÓN from ITEISA, based on the previous work of Bruno Torres and The phpBB Group.

    The latest version of this file can be found on http://www.iteisa.com/phpbb2bbpress/.

    Starting conversion

    1.

    Connected to the phpBB database host

    2.

    Selected the phpBB database

    3.

    Exporting forums…

    4.

    Exporting users…

    5.

    Exporting user metadata…

    6.

    Exporting topics…

    7.

    Exporting posts…

    8.

    Sending all your database e-mails to all major world-wide spam sending mafias…

    ‘strong’dsfgds’strong’


    eslavin83
    Member

    @eslavin83

    can anyone answer the question regarding the “39816” error? i get up to step 8 and then that string of numbers shows up. i checked the new database and nothing has been pushed into it.


    eslavin83
    Member

    @eslavin83

    i’m also getting this warning message:

    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/public_html/bbs08/phpbb2bbpress.php on line 922


    eslavin83
    Member

    @eslavin83

    can anyone help?

    after the script runs, isn’t there an sql file that’s supposed to be generated from the old board & saved into a /tmp/ folder?


    copperblade
    Participant

    @copperblade

    I still have a phpBB2 forum I need to convert over… does this script work on the current versions of bbPress?


    fontadoni
    Participant

    @fontadoni

    The script worked for me last night and this is the second phpbb 2 board I convert. A few tips I can give whoever will try this script:

    Follow the steps that come in the given file but make sure to:

    1. Install bbPress 0.7 first, then upgrade to 0.8 when you have done the conversion. You can download 0,7 here: https://bbpress.org/forums/topic/download-previous-versions-of-bbpress#post-17770

    Then you can go ahead and upgrade to the latest version (1.0.2). Make sure you update the settings in your admin panel (board path, name, etc) as you will need to get rid of your old config.php file when you upgrade to 0.8

    2. If you’re hosted on 1and1, switch EXPORT_TO_FILE to false and AUTO_IMPORT_EXPORTED_DATA to true. Also add teh following code to your .htaccess file: AddType x-mapp-php5 .php (not sure if this is necessary but it worked for me).

    3. I got an error saying that some query was empty, but it seems that the conversion went without any problems.

    Glad to see things are still moving here. This thread was started 2 years ago, and is still active as of 3 months ago!

    We’re trying to move from phpBB that we’ve had for 5 years to bbPress. obviously, the 2 databases don’t match at all. We found this script. Can someone please update on the best way to migrate from a very active phpBB forums to bbPress? Has there been any new updates to this script?

    Thanks.

    I’d be interested to hear from anyone that has converted larger forums (100,000+ posts) from phpBB2 to bbPress. I’ve got 0.7 running in a dev environment, I’ve got the conversion script, but I haven’t fired it up yet. I’m going to take this slow and methodical. I also want to import user passwords and topic_watch (email subscriptions). Those I know I’ll end up having to do myself. I’m planning on temporarily storing phpBB passwords in a new table using two-way encryption as people login to the current site so that I can transfer those over when the time happens. I’ll also be working on my custom theme/templates before the conversion as well to make it as seamless as possible for users. Finally I might try to build a database of common words and do some auto tagging of old threads… that might be a bit too ambitious though.

    Still… I’d be eager to hear from anyone that has converted a 100,000+ post site with the script for any info or tips.

    have been attempting this as well but getting the same problem as eslavin83

    the script says it’s connected to the server and exporting the forums/users etc but nothing comes up after ‘Sending all your database e-mails to all major world-wide spam sending mafias…’ – I’m waiting for it to say its exported the new db, or give me an error message, but nothing else happens.

    Any ideas?

    thanks in adance!

    yoyopop, that happened to me the first few times as well. (I converted a database with about 120,000 posts this morning.) PHP was just running out of allocated memory. I bumped it up to 16 MB, then 64 MB, then 256 MB and finally 1 GB. After I gave it 1 GB the conversion went through.

    So check your Apache error_log or your PHP error log to see if it is running out of memory… then give it as much as you can.

    I have an experimental plugin for bbPress I’ve been working on this week that adds an “Import” wizard under the admin area “Tools” menu. As it stands I have been using a phpBB 2.0.23 forum with 3 users (“Anonymous”, “admin” and one other) and about a dozen posts for testing and things look pretty good.

    The “Import” plugin needs beta testers who’re willing to give it a run through and provide feedback.

    The plugin reads data from the phpBB database, and rather than generate an enormous SQL file that is version specific, the plugin calls the same internal methods inside bbPress as occur when you manually create forums/topics/posts/users. A mapping is maintained between old and new user/post/topic/forum ID values, and referential integrity is maintained throughout.

    thanks tflight, I thought it could be something like that, I’ll give it another go!

    paulhawke – this sounds great for the future, having a more user-friendly way to convert will open the door for a lot more people to use bbpress. Any plans to copy of private messages?

    tflight – I didn’t have rights to give php more memory on my server so I ran the php script locally on my machine using XAMPP, which successfully converted the database. Now just to replace the old db! :)

    @yoyopop – I have been looking at what is core to bbPress thus far. It hadnt even crossed my mind that private messages would want to be converted. But there’s a problem – if I convert them, what do I convert them to? Does the community feel that any one private messaging plugin should be endorsed over any other, and, does the private message plugin provide the code I need to create its raw data? If the answers are “yes” (or a ‘qualified yes’) then I’ve no problem working it in.

    For those interested in beta testing, the plugin (at present) is grossly inefficient as far as memory goes and now that it works at a basic level, I’m looking at optimizing & reducing memory footprint.

    paul – I understand private messages aren’t part of the bbpress core, and I haven’t investigated all the possible plugins yet. If there could be an optional conversion that relates to a certain plugin, then of course that would be great. However, at the moment if I’m going to transfer my forum across, I was planning to inform my users before the move just to backup their PMs if they have anything important in them.

    I just got a test conversion to work so will start to check out possible plugins etc next! Thanks for the help, hopefully bbpress can continue to grow!

    paulhawke, I’d like to give it a shot as I’m still several weeks away from a final cut-over. My two biggest pain points right now are preserving user passwords and preserving user email notifications… both of which are outside the scope of your project but issues I’m working on.

Viewing 25 replies - 26 through 50 (of 56 total)
  • You must be logged in to reply to this topic.
Skip to toolbar