Page 1 of 6

Converter Release: Snitz Forums to PHPBB and PHPNuke

Posted: Sun Oct 22, 2006 1:58 pm
by Endeavour2

I've released my Snitz Forums to PHPBB / PHPNuke (bbtonuke) converter (2 converters included, one for Nuke and one for BB). This script fully migrates all forums, forum structure, topics and posts. It also merges user databases - more on this in the documentation. Snitz code to BBCode is done for all topics, and the forum search tables are properly set up.

No code changes, mods or hacks to the PHPBB / PHPNuke source are required, and all posts/topics are ordered correctly after migration. Simply run the converter and that's it.

Note, I only had limited Snitz test data to do this with and it has only been tested with Nuke 7.6 and PHPBB 2.0.21, but should work for other versions.

You can download it here: ...

v0.3 released 08-01-07

*edit 17-02-07* Patch to v0.3 required

You may need to apply the following patch to the converter (if in doubt, apply it). Before running the converter, open Snitz2PHPBB.php and go to line 1047. You should see:

Code: Select all

$query = "SELECT * FROM ".$snitz_topics." WHERE `TOPIC_ID` >= ".$nexttopic." ORDER BY `LASTACTIVITY` ASC LIMIT ".$LOW_MEMORY_MAXTOPICS;
Replace this line with:

Code: Select all

$query = "SELECT * FROM ".$snitz_topics." ORDER BY `LASTACTIVITY` ASC LIMIT ".$nexttopic." , ".$LOW_MEMORY_MAXTOPICS;
Save your changes and begin the migration as normal.


Posted: Mon Nov 13, 2006 7:03 pm
by Endeavour2
Received this message from joeventura, figured it would benefit others using the converter.
Process seems pretty straightforward however some questions:

On this line:

$snitz_url = " ... ?TOPIC_ID=";

Is there supposed to be something entered for: PATH_TO_SNITZ_FORUM ??

Yes. This is how the converter knows what the relative links are within your site.

Assuming your users access your snitz forum by:

Code: Select all
You would change this config line to:

Code: Select all
The converter examines each post for a Snitz URL tag that begins like this. It then rewrites the tag to BBCode compliant URLs that point to your new PHPBB forum (which you define with the next config option).

It's aimed at letting you migrate Snitz forums at (for example) to PHPBB forums at (for example), whilst keeping links in posts working (links in one post that link to another post in the forum).
Also having problems with this:

Use MySQL Migration Wizard to import your Snitz data to a
MySQL database - this can be the same or different MySQL

Is this the Migration Toolkit? The Wizard does not allow for a dumped file, I need to upload the database to my server as a MySQL dump

Any suggestions? I have a 10mb Snitz Forum that I need to convert.


The MySQL Migration wizard definitely does allow for a dumped file, it just doesn't look like it. It was bad design on MySQL's part, IMO.

Follow the migration steps through, past where you select the access database and choose the tables/schema etc. You'll end up at a screen asking you for your MySQL server & login details - I assume this is where you got stuck?

Give it any valid MySQL server details, even one at your ISP - it doesn't matter. When you get past this step (all this step does is check the connection works, it doesn't migrate any data) you'll be given options whether you want to directly migrate into a MySQL server or create SQL dump files. The wizard will create 2 dump files, one for the table structure and one for the data.

Hope that helps.

*edit* removed the actual site URL as requested.

Posted: Tue Nov 14, 2006 4:42 pm
by joeventura
Go further along in the process but now stuck here:

Confirmed the anonymous group was where it should be.
Confirmed the anonymous user was where it should be.
Found the last current phpbb userid (3), Snitz users will begin at 4.
Catch-all Snitz user already exists, guess you ran this script before :)
Deleting all phpbb users with a UserID higher than the Snitz catchall user.
Snitz catch-all user in the phpbb database had the right ID (3), so we're good to go with ID conversions.
New starting phpbb userid (same as above if Snitz catchall existed) is 4

MySQL query error!


mysql_errno = 1016
mysql_error = Can't open file: 'FORUM_MEMBERS.ibd' (errno: 1)
extra info =

Posted: Tue Nov 14, 2006 8:15 pm
by Endeavour2
Do you have PHPMyAdmin available to access this MySQL database with?

If so please paste the query as shown in the error message into the PHPMyAdmin SQL query option thing and let me know what happened.

It's very odd that failed, the script can clearly read the members table because it managed to add the Snitz user...

Posted: Wed Nov 15, 2006 5:21 am
by joeventura
Well I figured the previous problem in that the data did not transfer to the database so the structure was there with no content.

Fixed that,
ran the conversion again and it went halfway then:

Here come the forum topics, nearly done. Why oh why did you use Snitz to start with?
Last phpbb post before migrating the stupidly designed Snitz topics is 5743.
Performing low memory migration, this iteration will migrate topics 1206 to 1406 out of 2104 total.

MySQL query error!


mysql_errno = 0
mysql_error =
extra info = No posts in the Snitz topics table???

Have I run out of luck?

Posted: Wed Nov 15, 2006 7:00 pm
by Endeavour2
That's an error thrown by the script because the SQL query executed successfully but no rows were returned.

Can you do the same thing in PHPMyAdmin with that query please, it should return 200 rows beginning at topic 1206.

The low memory migration uses the same code repeatedly in stages, so as you've already done about 5 stages we know it works...

Posted: Tue Jan 02, 2007 8:26 pm
by Endeavour2
v0.2 released, download here: ...

Code: Select all

0. Changelog
v0.2	- 	Fixed duplicate topic issue caused by Snitz leaving ghost topics
			behind (apparently when moving posts etc). Duplicate topics have
			the oldest topic deleted. This won't affect posts.
		-	Add fixup for the userid auto_increment to match the actual next
		-	Fixed a bug in the posts migrator, where the link to move to the
			next stage of the low memory migration wasn't updated with the
			correct params.
		-	Added option to skip the Snitz table fixup stage - useful if you
			have to run this script more than once as fixup only needs to be
			run once.

Posted: Mon Jan 08, 2007 7:33 pm
by Endeavour2
v0.3 released, download here: ...

Code: Select all

v0.3	-	Re-release of 0.2 mainly because there was a screwup with the
			previous package, which didn't include all the fixes.
		- 	Fixed a bug where the user's first name wasn't migrated
		-	Join dates appear properly in PHPBB migration now

Posted: Tue Jan 23, 2007 5:18 pm
by Nemesis=>
Hi i have a running phpbb forum whit ofcourse its own database. I installed phpnuke 7.6 latest patch,Imported the nuke.sql trough phpmyadmin in another created database(same server) ,i made my Super user/admin in phpnuke.

Forums in phpnuke i didnt touch anything,no one registered. Well i upload all the Snitzz files to my webroot and configured to the converter wich is snitzz2nuke. During the process it stopped and says this:

Code: Select all

MySQL query error!

Query was: INSERT INTO nuke_users (`name`, `username`, `user_email`, `user_website`, `user_regdate`, `user_password`, `user_active_cp`, `user_interests`) values ('SNITZ MIGRATION', 'Snitz User', '', '', 'Jan 23, 2007', '4a24c0544fe757efc522a3079d9db4a3', 'YES', 'This is a catch-all user for posts from deleted/invalid user accounts. It was created during the Snitz forum migration. This is not a real person!')

mysql_errno = 1044
mysql_error = Access denied for user 'my_databasename'@'localhost' to database 'my_databasename'
extra info = Couldn't add the catch-all Snitz user into the Nuke user table

So whats wrong?? :(

Posted: Wed Jan 24, 2007 1:39 pm
by Endeavour2
The access denied error indicates the user account you configured in the migration script doesn't have the appropriate privileges to add rows to tables.

Check the database permissions for the user account you're using (in the error you pasted, "my_databasename", but I assume you've anonymized that).

Posted: Wed Jan 31, 2007 12:21 am
by darthtony
something similar to covert Themes ?

existing snitz user password problems

Posted: Tue Feb 06, 2007 10:10 pm
by ostiaxboz
first of all thanks for your job Endeavour2...

I've successfully converted my old snitz (on a .mdb db) forum to a new phpbb /mysql forum, now i've only 1 problem: i can't login with my old user and pass on the new forum; however if i add a new user there is no login/logout probs, as far as like if I use the user/passwd data which i've added after the phpbb installation to test it

I'm testing the migration locally for the moment on a debian distro...

Any ideas?

Tnx in advantage

I've clicked on the link "Forgot your password?" and now it's all ok
Thanks Endeavour2


Posted: Wed Feb 07, 2007 8:04 pm
by Endeavour2
Hi ostiaxboz. That's a curious problem. Do you mean you can't log in with *any* migrated user, or just with your own account?

If it's your own account, when you installed phpbb did you create an admin account with the same username as your Snitz account? The script merges accounts and posts so if you named your admin account the same as your snitz user account it will have merged them.

Last thing, can you log in with the PHPBB admin account?

Oh, you did use the PHPBB lost password recovery, didn't you? The script can't migrate Snitz passwords...

Couldn't convert last activity from free text to DATETIME in

Posted: Fri Feb 09, 2007 11:52 pm
by fedetamayo
Hi Endeavour2,

I'm using your converter. All fine until step 4, I get the following error:

MySQL query error!


mysql_errno = 1064
mysql_error = You have an error in your SQL syntax near '(T_LAST_POST AS DATETIME)' at line 1
extra info = Couldn't convert last activity from free text to DATETIME in FORUM_TOPICS for topic fixup.

Any ideas what is wrong?


Posted: Sat Feb 10, 2007 6:33 pm
by Endeavour2

The problem is exactly as the error says - the converter is trying to convert Snitz date and time stamps to PHPBB compatible timestamps.

I don't know why that's failing though, it's using an internal MySQL feature.

Can you try running that query directly on the database, for example through PHPMyAdmin SQL option? Simply copy and paste it and see what happens.