Migrate a phpBB3 forum to Discourse

It looks like the current version of the script has some bugs. Can you try to update your settings.yml file and ensure that new_categories and category_mappings look like it’s shown below?

new_categories: []
category_mappings: {}
11 Likes

@gerhard thanks U for the tip … i will try that in a instant

1 Like

thanks a lot , it worked

3 Likes

A post was merged into an existing topic: Beginners Guide to Install Discourse on Windows 10 for Development

This is great news! Thank you. I have a test 3.2 sqldump that I’ll play around with, and will make a copy of 3.3 to give a try. Wish I could afford to just have you guys handle it but the pockets are very empty… heh.

Anyway, thank you again and looking forward to giving this a try!

2 Likes

Having trouble importing in… When I run the import script, it put my sqldump in, and it says “The phpBB3 import is starting…” but immediately throws a traceback with the general error:

/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.0/lib/bootsnap/compile_cache.rb:29:in `permission_error’: bootsnap doesn’t have permission to write cache entries in ‘tmp/cache/bootsnap/compile-cache’ (or, less likely, doesn’t have permission to read ‘/usr/local/lib/ruby/2.7.0/set.rb’) (Bootsnap::CompileCache::PermissionError)

Obviously some kind of permission error but I’m trying to determine what I need to do to fix it… Any help appreciated!

1 Like

UPDATE! Got it figured out! Quick chmod in the container fixed up that issue.

Tested with a phpBB3.3 database making the edit you suggested and it works like a charm! Doing some more thorough testing but everything is more or less there with the exception of some expected bbcode issues. Users, messages, posts, everything copied right in. The only thing that seemingly did not work is the password migration. This is a minor thing. I had the module install and could see it loaded so not sure why they didn’t transfer. It’s no matter though, I’m excited to finally be kicking phpBB to the curb.

Thank you again @gerhard for your work!

2 Likes

That’s good to know. Feel free to send me a PM with examples of BBCode issues. I’m interested in the value of the phpbb_posts.post_text column.

3 Likes

I tried 2 times importing a phpbb3 (.2.7).
The first time not a single topic was imported and users were messed up.
I reinstalled ubuntu from scratch and redoing everything but this time I’m stuck at the import_phpbb3.sh part, it loads the database and then stops with this error:

The phpBB3 import is starting...

Traceback (most recent call last):
        20: from script/import_scripts/phpbb3.rb:13:in `<main>'
        19: from script/import_scripts/phpbb3.rb:14:in `<module:ImportScripts>'
        18: from script/import_scripts/phpbb3.rb:15:in `<module:PhpBB3>'
        17: from script/import_scripts/phpbb3.rb:15:in `require_relative'
        16: from /var/www/discourse/script/import_scripts/phpbb3/support/settings.rb:5:in `<top (required)>'
        15: from /var/www/discourse/script/import_scripts/phpbb3/support/settings.rb:5:in `require_relative'
        14: from /var/www/discourse/script/import_scripts/base.rb:16:in `<top (required)>'
        13: from /var/www/discourse/script/import_scripts/base.rb:16:in `require_relative'
        12: from /var/www/discourse/config/environment.rb:4:in `<top (required)>'
        11: from /var/www/discourse/config/environment.rb:4:in `require'
        10: from /var/www/discourse/config/application.rb:70:in `<top (required)>'
         9: from /var/www/discourse/config/application.rb:71:in `<module:Discourse>'
         8: from /var/www/discourse/config/application.rb:96:in `<class:Application>'
         7: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `require'
         6: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:291:in `load_dependency'
         5: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `block in require'
         4: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
         3: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
         2: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
         1: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- mocha/version (LoadError)

Any help is much appreciated.

1 Like

Update on phpBB 3.3… something I wish I noticed before I transferred the forums: Attachments changed in 3.3. Instead of using the physical file name, there is now a unique identifier on each that is cross-referenced in the table phpbb_attachments. The unique file identifier is in the format of USERID_possiblyrandomstring

There is no file extension or anything, as phpBB 3.3 figures that out from the table… I’m not sure of a way to automate the process, so I’m currently going through in batches at a time restoring the old images… I might be able to speed up my process as I have an older copy of the images prior to the 3.3 update, but people be ware that importing from 3.3 can break your attachments, and you’ll be in for a fun time especially if you have a few thousand like I do… oh well! Luck of voluntarily being the guinea pig

2 Likes

Was that the most info it provided you? Mine said that it was unable to load the tmp/ directory due to permission issues, so while I was in the import container, I ran a chmod -R 777 on that directory. Again this was only for the import, and will not impact your “app” container.

2 Likes

I managed to import from phpbb 3.2 but i had to:

  • Import db on internal mariadb manually mysql -u root -p phpbb < /shared/import/mysql/data/phpbb_mysql.sql

  • Set settings.yml new_categories: [] category_mappings: {}

  • Repeat multiple time the import script because posts and topic give me errors on first time

After that all work fine…

2 Likes

Hello everyone.
I have a problem.
There is https://discourse.example.com/
I want to import a database from https://forum.old.example.com/
I followed all the steps from this guide
I made a database dump named it phpbb_mysql.sql and put it in

/var/discourse/shared/standalone/import/data/

After I do

/var/discourse/launcher enter import
import_phpbb3.sh

I get the following error:

Table ‘phpbb.phpbb_config’ doesn’t exist

Could it be a matter of settings.yml ?

Please help me solve this problem

1 Like

Make sure that the table_prefix is correct. Is it shown as phpbb_ in the control panel?

2 Likes

Yes, my prefix is correct

1 Like

If I’m seeing correctly, schema in your settings.yml should be set to teamlab_forum_saas.

2 Likes

This is the name of the database. Is this the scheme?

1 Like

That’s correct. In mysql schema is synonymous with database. :slightly_smiling_face:

3 Likes

Just a moment, I’ll try.

1 Like

Turn out. Thank you very much. It helped :+1: :clap:

2 Likes