[SMF Converter] Yabb - 2.1

Started by JayBachatero, October 24, 2006, 12:07:33 PM

Previous topic - Next topic

SleePy

Command line would be quicker as you do not have to worry about the apache timeout.
If you just do the file name, it should detect no parameters set and will output a nice list of options you can specify.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

njahnke

MINI:forum njahnke$ php -f convert.php
Array
(
    [0] => convert.php
)
ERROR: You must enter the path_to in order to convert.MINI:forum njahnke$


hmmm ...

SleePy

My bad, it didn't do it for the 1.1 converter (it was fixed in the 2.0 converter).

Try the attached one. I simply just had it force the --help command if there is no parameters set.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

njahnke

thanks for that - still having trouble with the cli convert ...

MINI:forum njahnke$ php -f convert.php -- --path_to="/Volumes/t/forum" --path_from="/Volumes/t/yabb2bak" --db_pass=abc123

Starting Conversion
Successful.
* Recalculating forum statistics...  Successful.

Conversion Complete!
Please delete this file as soon as possible for security reasons.

Notice: Undefined index:  convert_script in /Volumes/t/forum/convert.php on line 727

Warning: Invalid argument supplied for foreach() in /Volumes/t/forum/convert.php on line 730

Notice: Undefined index:  convert_script in /Volumes/t/forum/convert.php on line 740

Notice: Undefined index:  convert_script in /Volumes/t/forum/convert.php on line 658

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1111

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1121

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1129

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1139

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1152

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1165

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1208

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1210

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1216

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1222

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1232

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1233

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1240

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1242

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1247

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1248

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1253

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1254

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1278

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1280

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1286

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1298

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1321

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1323

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1363

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1378

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1406

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1408

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1421

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1441

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1446

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1501

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1503

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1539

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1558

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1581

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 1582

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 2250

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /Volumes/t/forum/convert.php on line 2250

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2091

Notice: Undefined variable: result in /Volumes/t/forum/convert.php on line 2092
MINI:forum njahnke$


i changed the db password to something simple (also changed it in smf) to make sure it wasn't choking on weird characters in the password, still a no go. works in the browser but i'd like to do this quickly if possible as i'll need to do it "for real" eventually and the old forum can't be live during that time obviously.

SleePy

Is there the .sql script there?
You didn't specify it:
Quote--convert_script        The name of the script. (old_forum_to_smf.sql)

If you need the name you could either browse there or just do the command "ls -a" (add g if your used to that type of output) and have it list out all the files in the current directory and copy and paste it  :P
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

njahnke

tried again in the browser before i got your last message, this time with everything locally though. left it until just now, was hung for ~12 hours, just like before, at:

/forum/convert.php?step=1&substep=0&cstep=11&start=0

now, every time it reloads, i got 100% cpu use from mysql, but i have to wonder whether it was actually accomplishing anything. going to try again from the commandline and see if there's any difference.

SleePy

Do you know what query it is running that is doing that?
If that url is true then it is doing a step that does very minimal mysql usage (its converting the membergroups).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

njahnke

no i don't know the query - maybe if it hangs this time i can enable a debug mode for convert.php to print that information for you? and yes that would be strange especially given we only have like two usergroups on this forum.

SleePy

Well debug from convert.php only outputs a little bit more informatin, it doesn't do to much more at the moment :P

Try enable logging for mysql (and slow query logging as well). See what query is possibly taking a long time or what the last query ran was (as the query with the problem should be shortly after that).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

njahnke

trying again now that my server is back up (was affected by the explosion at the planet).

can get through to "recalculating forum statistics" fairly quickly, but then things get really slow. got some slow queries for you:

# Time: 080606 17:28:02
# User@Host: sda[sda] @ localhost []
# Query_time: 11  Lock_time: 0  Rows_sent: 0  Rows_examined: 231890
SELECT ID_MSG, temp_filename    LIMIT 0, 100;lename != ''ges
# Time: 080606 22:33:49
# User@Host: sda[sda] @ localhost []
# Query_time: 18250  Lock_time: 0  Rows_sent: 0  Rows_examined: 1925863060
SELECT t.ID_TOPIC, COUNT(m.ID_MSLIMIT 0, 200; = 0ICsdaforum`.sda_messages AS m ON (m.ID_TOPIC = t.ID_TOPIC)
# Time: 080607  3:39:30
# User@Host: sda[sda] @ localhost []
# Query_time: 18341  Lock_time: 0  Rows_sent: 200  Rows_examined: 1925863260
SELECT  LIMIT 0, 200;ST_MSG != myID_FIRST_MSG OR ID_LAST_MSG != myID_LAST_MSG OR numReplies != myNumReplies
# Time: 080607  8:35:27
# User@Host: sda[sda] @ localhost []
# Query_time: 17757  Lock_time: 0  Rows_sent: 200  Rows_examined: 1925863360
SELECT  LIMIT 100, 200;_MSG != myID_FIRST_MSG OR ID_LAST_MSG != myID_LAST_MSG OR numReplies != myNumReplies


output looks like this:

MINI:forum njahnke$ php -f convert.php -- --path_to="/Volumes/t/forum" --path_from="/Volumes/t/yabb2bak" --db_pass=abc123 --convert_script=yabb21_to_smf.php
Successful.<br />
........................... Successful.<br />
Successful.<br />
..... Successful.<br />
. Successful.<br />
...................... Successful.<br />
......................................... Successful.<br />
................................ Successful.<br />
...... Successful.<br />
... Successful.<br />
... Successful.<br />
... Successful.<br />
.. Successful.<br />
Successful.<br />
............................... Successful.<br />
Successful.<br />
Successful.<br />
. Successful.<br />
* Recalculating forum statistics... ....


i guess those long queries are the last four dots. taking several hours each - i've never seen this complete before (always had to terminate it), so don't know how much longer it's going to take or even if the conversion is running properly. if we could optimize these it would be great because i will have to have my yabb forum down the entire time when i do the real conversion. thanks.

SleePy

Ok, just kill that

Go into the SMF Admin panel
Then Forum Maintenance.
Do the Find and Repair Errors as well as Recount Totals and Stats options and let those run.

They are basically the same thing (minus a few things).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

njahnke

ok, running find & repair errors through the forum interface now - thing is it's still really slow - at only 15% after several hours - i can deal with it, just curious whether it's normal or if anything can easily be done.

SleePy

For converting form a flat file system, yes it would be normal ;)
There are a lot of errors and issues that come from converting from a flat file system.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

njahnke

was able to speed up the error checking and total recounting phases dramatically by adding an index to ID_TOPIC in messages:

create index sda_messages_ID_TOPIC on sda_messages (ID_TOPIC);

they went from taking hours to minutes. either that or it was because i changed the first user on the new smf forum to have a unique username against the yabb forum - it matched a username on yabb before - i added the index and changed the username at the same time and then the speedup happened so i don't know which change did it. suspect it was the index though. now i can do the whole conversion in about 7 hours.

looking at the converted forum i noticed the converter aborted on contact with extended latin characters. so if a post contained "das wäre gut" then it only wrote "das w" in smf. this is not a big deal as i only had very few non-english posts in the old forum but i was wondering if there was a quick fix for the converter before i do this for real (probably tomorrow). thanks again.

ThorstenE

is the SMF installed in UTF-8 or latin1 Database? (I Think it's a typical behaviour when SMF Installation is UTF-8).

maybe, you get better results with latin and after successfull conversion change it via ACP to UTF-8.

njahnke

that was it - thanks!

successfully launched the new forum tonight. unfortunately i didn't notice until too late that all the pms were destroyed - the converter apparently was off by one field, so author was in date, etc, and the message text was totally lost. i don't care that much, but i'll have to retrieve people's pms from the old forum in plain text on request. just a heads up in case that's an easy fix.

Valkrider

I have just downloaded the latest yabb-smf convertor.

I have done a new smf install. I have checked that I can login to the new board. I have uploaded the yabb-to-smf and the convert php files. I have accessed the convert programme in my browser (FF3) and I get a blank screen with done on the footer bar of the browser. I did not get the options everyone else is mentioning in this thread.

I have obviously missed something. Anybody got any bright ideas?

TIA

Colin

SleePy

A blank screen usually indicates that a fatal error has occurred and the php is not allowed to echo it out.
You will need to ask your host where php error logs are kept, so you can access them and look at what error is being generated here.
That error is going to help out, otherwise we could try hundreds of things and it would be like finding a needle in a haystack :(
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

shanksta13

For some reason I'm having trouble getting the convert.php to recognize my SMF database password.  I've tried several clean installs and nothing will seem to make the converter recognize my database password. 

So, I'm thinking that I'm going to completely start over from scratch, and list the steps that I've been doing and maybe someone can point out what I'm doing wrong.

1. Install SMF via cPanel.  When I do this step, I'm asked for an admin username and admin password.  This is the SMF database password right?  This is what I've been trying to use, although I've also tried looking for a password to my YaBB database, but I'm not even sure where the database is for YaBB, it's not listed with all the other ones on my server.

2. After I've installed SMF, I upload the zipped converter files (convert.php and yabb21_to_smf.php) to the SMF directory and unzip them.

3. After I've done this, I open the URL for the convert file to begin conversion.  I set the directories to the corresponding forum directories and then when I go to put in the database password, this is where I get stuck.

Where should I be finding the password I'm supposed to use and is it the password for the SMF database or the YaBB database that I should use?

SleePy

It is the smf password it uses to connect to the database. This is for security reasons only.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: