Here is described the first, not finished, semi-automatic method to convert the phpBB database to AsmBB.
Here are the steps:
Dump the mysql database to SQL dump.
INSERTstatements in two different .sql files. Remove all other code from the dump. We will not need the indices, triggers and so on.
Convert the file with the database schema (the create statements) into SQLite format. There are some tools available (I will attach some in the post) but they does not work very good. I will attach as well the schema file from the version of phpBB I converted (
Convert the data dump (insert statements) into SQLite format. Actually for MySQL only the string constants need to be converted, because it uses C style character escapes, but not SQLite. I have written special tool (attached
mysql2sqlite.tag.gz) in order to convert the strings, because the available was not able to make it. The program reads from STDIN and writes to STDOUT. For example:
Run so prepared dump files with the console version of sqlite in order to create SQLite database with the structure and data of the converted forum. Something like:
The next step is to put the attachments into the database (because phpBB stores them as a files. Execute the script
attachments.sqlagainst the database. But first check the paths used inside. In my case, the files are located in
Install locally AsmBB and run it in order to create new empty AsmBB forum. Create an admin user with name that not exists in the phpBB forum.
put the created
phpbb.sqlitedatabase in the same directory where AsmBB is installed.
Open the local AsmBB in a web browser, login as an Admin and open the SQLite console. You
mustuse the SQLite console for the following processing, because AsmBB uses some user SQLite functions that are not available in the other SQLite tools.
Copy the text from the file
phpbb.sqlinto the SQL window and execute it - it should import all data from the phpBB database into the AsmBB database. Check carefully the result messages in order to detect execution errors. It is a good idea to first make a copy of the initial empty AsmBB database in order to have an easy way to undo.
cat phpbb_insert.sql | ./mysql2sqlite > insert.sql
sqlite3 phpbb.sqlite < ./phpbb_schema.sql
sqlite3 phpbb.sqlite < ./insert.sql
sqlite3 phpbb.sqlite < attachments.sql
After this step we have an SQLite database
phpbb.sqlite with the structure and data of the original phpBB forum.
Notice: The script converts the phpBB private messages into an AsmBB "Limited Access Threads" (LAT) but because of the very nature of the private messages, the result is not very good. I am working on a way to make this conversion in a more natural way, but with little success so far.
All the mentioned above files are attached to this post: