Hi All
Is there a way to import a phpbb database into SMF.
Manythanks
Paul
Yep, we have a phpBB2 convertor.
http://www.simplemachines.org/download.php?converters
Many thanks David.
Hi,
I got this errors (many) while converting:
Converting members...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 287
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 302
successful.
The list is longer but this are the two sorts of errors I get about ten times.
I work with phpBB version 2.0.10 and convert to smf rc1.
My MySQL ofthen seems to act strange when there are no ' around the fieldnames. Could that be the problem here?
Any ideas?
Greatfull for you're help,
Abedie
Based on domain name I suspect your database may have a '-' in it? The dash, and many other characters, is only allowed in database, table and field names if included in a quote delimited string. The converter doesn't include these quotes (and neither does the updated converter due for release with RC2) and that is almost certainly why other tools give errors when you miss out the quotes.
I think you've got three options...
1) Can you rename your database to use '_' rather than '-'? The converter should then run without problems. You'll have to change your phpBB config file to point at the renamed database (along with any other software that accesses the database). This may not be easy (if you rely on a shared hosting company to set up databases for you) or if you have a lot of software accessing the database.
2) Modify the current converter to include quotes round all the database/table/field references.
3) Wait until the updated converter is modified to include quotes round all the database/table/field. This assumes that the converted can be modded and tested before RC2 hits the streets.
I don't know when RC2 is due for release, but the updated converter migrates a lot more phpBB data across to SMF than the current converter, so you might prefer to wait to do your migration until it's released.
Thank you very much for you're reply, that was very quick :).
The only character I use with names of DB's is the '_'. The domain has a '-' in it but the username not.
Can you please give me an example how I addapt the script so that there are ' .... ' around fieldnames as MySQL asked for those from the beginning and is set to do that, whatever there is in the fieldnames. I have access to the dbases by phpmyadmin and can create them myself.
Thanks again :),
Abedie
I'm not sure why you'd need quotes round all the database/table/field names. alphanumeric characters plus _ and $ are always allowed. From v3.23.6 you could add quotes to allow other characters to be used, as well as creating fully numeric names and names containing reserved words. What is your database name and what is the phpBB2 table prefix string and do they have any unusual characters or reserved words in them?
The dbname is 'tocai_sts'. The prefix = 'phpbb_' the standard given. I use MySQL 4.0.17.
So nothing strange.
Thanks again :).
Abedie
I had to go do some DIY :(
I can't think why you need quotes round all the fields. There doesn't seem to be anything unusual in your naming convention. Can you run the converter again and count exactly how many times you get the errors. I think you might get 11. If you can also note down what is being converted at the time that will help narrow down the source of the problem.
I have to go to eat now. I'll check back in later on this evening to see if I can work out what's going wrong for you.
Thank you very much!
Here's the error report:
Converting...
Converting members...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 287
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 302
successful.
Converting categories...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 407
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 417
successful.
Converting boards...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 498
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 508
successful.
Converting topics...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 592
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 602
successful.
Converting messages... (this may take some time)
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 696
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 706
successful.
Converting polls...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 782
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 792
successful.
Converting poll options...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 862
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 872
successful.
Converting previous poll votes...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 941
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 951
successful.
Converting personal messages...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 1026
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 1036
successful.
Converting personal messages (step 2)...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 1105
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 1115
successful.
Converting topic notifications...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 1185
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/tocai/domains/tocai-ananda.org/public_html/phpbb2_to_smf.php on line 1195
successful.
Converting board access... successful.
Converting smileys... successful.
Recalculating forum statistics... successful.
As you see it's a pair of fetch and row error's that repeat itself when a new part is converted, like members, catagory etc.
Hmm, can't be that big as it apears just ones per part and it shows the other things are working fine.
I was switched to phpBB because Invision got commercial and I found this board to late for our organisation. Could be wise if everybody uses the same forumscript (smf) so we have for the last time these convert problems ;).
Have a fine meal and some rest :)
Thank you very much from this side of the world.
Abedie.
The error log means that my hunch is probably right about the code construct that's causing the problem. I'm not sure how to fix the problem at the moment, but I'll look into it this evening.
Actually, the converters should work with dashes, etc. They do this:
`databasename`.tablename.columnname.
This means it's okay to have dashes, underscores, and even other characters in your database name. There need not be ticks around fields or tables, unless your prefix has strange characters in it (and I personally think them ricks are UGLY.)
The errors may be seen by adding "or die(mysql_error())" on the end of a query.... but, I think I know the problem...
Code construct? I don't know what you mean.
Abedie, are you running the converter between two different databases? Have you checked that the users can access each other's databases?
-[Unknown]
The errors occur in 11 step routines. The only step routines that fail all contain code which converts a table into a SELECT string and the invalid query result errors occur when string is used. So it's fairly likely that the error is related to code constructs like...
$categories_table = array(
'ID_CAT' => 'cat_id',
'name' => 'cat_title',
'catOrder' => 'cat_order',
'canCollapse' => '',
);
...and/or the code that turns that table into the SELECT string.
Having said that I can't work out why it's failing in this case yet. If the database normall needs ticks then it suggests that something in the database, table or field names contains unusual characters. However, there is no evidence of anything odd in the naming conventions used. There are also other SELECT statments used (without the table to string conversion stuff) which don't appear to be failing which is at odds with the tick theory.
Again, here's what's happening:
SELECT column
FROM database1.table1;
--> MySQL ERROR: User "database2user" doesn't have access to database1!! EVIL HACKER GO AWAY!!!
INSERT INTO database2.table1
(column)
VALUES ('oops didn\'t get them!');
--> OK.
It has nothing to do with ticks. It's happening only for those queries that try to access the phpBB database.
-[Unknown]
I suspect you're right :D
In my defence ;) I'll say that the routines that build a SELECT string also happen to be the only routines that access the phpBB database. I was thinking about the latest converter which has routines that access the phpBB database without building a SELECT string first. I assumed that other queries (actually non-existent in this version) were successfully accessing the DB.
Hi,
First thanks for you're efforts to try to solve this.
Thinking outloud:
1. The phpBB2 dbase is still in use, using the details that are in the settings in config.php, the same details the convertor is pointed too. It's checked by the converter before the conversion started.
If the phpBB2 forum works with those details the access with the given details should be ok, so why should they fail to work, only when the converter is working?
2. I created the account for this domain (tocai-ananda.org) and the database for phpBB2. When I wanted to switch to SMF, I installed it in a new subdir (forums) and created a dbase in the same account, having the situation of two MySQL dbases under the same domain on the same webspace. The names are 'tocai_sts' and 'tocai_smf', both working fine.
3. As the two forums do working fine, there's no reason to think of characters that won't be accepted by the server, as they should not be in there if that was the case.
Question: Could it be that the server refuses a second connection at the same time from the same IP, as first the 'tocai_smf' dbase is opened and then the phpBB2 dbase seems to fail as I read it in you're stories?
Thanks again,
Abedie
(I will check the users question you asked)
Quote from: Abedie on September 26, 2004, 06:38:45 PM
Hi,
First thanks for you're efforts to try to solve this.
Thinking outloud:
1. The phpBB2 dbase is still in use, using the details that are in the settings in config.php, the same details the convertor is pointed too. It's checked by the converter before the conversion started.
If the phpBB2 forum works with those details the access with the given details should be ok, so why should they fail to work, only when the converter is working?
The converter only uses one account - the SMF one. That means the SMF user must be able to access both the SMF tables *and* the phpBB ones.
Quote
2. I created the account for this domain (tocai-ananda.org) and the database for phpBB2. When I wanted to switch to SMF, I installed it in a new subdir (forums) and created a dbase in the same account, having the situation of two MySQL dbases under the same domain on the same webspace. The names are 'tocai_sts' and 'tocai_smf', both working fine.
Why not install SMF in the same database as phpBB, with the same user? Or if not that, how about in a different database, but with the same user?
Quote
3. As the two forums do working fine, there's no reason to think of characters that won't be accepted by the server, as they should not be in there if that was the case.
It's not characters, as I said... it's permissions.
QuoteQuestion: Could it be that the server refuses a second connection at the same time from the same IP, as first the 'tocai_smf' dbase is opened and then the phpBB2 dbase seems to fail as I read it in you're stories?
I'm not telling stories :P. This is not the case, but even if it were it would be avoided, because as I said only one connection is made.
-[Unknown]
Hi,
It's partly solved, I created (again) a permission trought the 'grant' option.
Seems there was an error with that, doing it over did the trick.
Our cheep us servers has a hickup sometimes and force one to wait till the command is worked out before one logoff, but it's always guessing when it's done.
I like to thank the both of you for you're efforts to help us. Please remember me if you can think of something I can do for you.
Goodnight,
Abedie
I have a quick question that may or may not fit in here, but I couldn't find anything like it (maybe I just don't search well :( ) ...
I've converted my old phpBB2 to SMF. (Sidenote: Best choice I've made in a long time!!) However, we have a separate phpBB2 board on the same server but with a different database and different structure. We'd like to move the posts into one of the SMF forums. Is there any way to do this? I'm thinking that, by hand, one might be able to do so with some effort, but even that seems like a long shot. Is there an easier way to do this? Is there even a way to do this?
Thoughts?
Thanks in advance.
bishop
How many posts is it? I'm sorry to say that currently there is no way to... "merge" two forums together.
-[Unknown]
223, though only about 100 are worth anything important at the moment.
If not, the users (staff members anyway) will have to just deal with it. But I thought I might at least check first and ask. Worst I could get was 'no'. :D
Well, this biggest problems are matching things up, like who posted what, etc... everythings handled by increasing IDs, so if you just put them together... the posts would be credited to people who didn't post them.
There are other barriers too :(.
-[Unknown]
Hmm, I like temptations to think about :).
I just think outloud now maybe there's some solution in it.
There was a time I worked with IB 1.3 and the crowd was happy and there was an active coding going on that version.
I did tested then a kind of 'port' function between two boards, making it so that when I put a message in a special created forum, it apears in an other connected board in the other forum. It was called warping. At the time we had two support forums and we used that to have a copy of support questions in both boards.
There also was a way to show complete topics from one board in the other.
In both cases it was needed to have both forums in the same dbase with a different prefix. The usability depends if the showed forum needs to be active or that it is about the info in it and it's not needed to change them anymore.
Now you're problem is to merge two boards, I think it's wise to splitup the problem in workable chunks.:
1. both boards need to become converted to SMF,
2. Both boards need to be merged.
I think this way it's logic as it seems more logic to combine two boards together when they have the same nature.
Then one (with some time at hand) makes a list of the hundred users that have to be saved, with the (new?) passwords to be used.
Then openup both forums, registrate the member in the board that has allready the most users, so they become added.
Then login in the old board as that member and copy the messages and place them as that user in the new board.
That can be done by hand, maybe even a little script to speed things up. It's time consuming, but if the info is real important, it's worth the work.
Greetings,
Abedie.