Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthortimberford
    • CommentTimeOct 5th 2005 edited
     # 201
    ah ok the migrator worked this time! thanks so much.

    for some reason the users and topics tables weren't exported from my phpBB db the first time round, hence the errors with accessing those tables. i guess they were missing in the exported .sql file

    cheers so much for this help though, it's much appreciated.

    one thing i have noticed is that two of my categories are missing. a bit wierd as they aren't any different to the others (as far as i'm aware!)
  1.  # 202
    hmm. That categories thing is wierd. Other people have reported category based problems.
    How many categories do you have? Would you mind helping me doing a bit of bug digging or would you rather just stick with your migrated forum as its going?
  2.  # 203
    i'm happy to dig.

    i have 11 categories (i know, far too many!) but they aren't all viewable to all users. one of the ones missing is only viewable to a select few members, the other is a totally open category. however, i have other categories that share the exact same user permissions and they have converted over ok.
    • CommentAuthorMinisweeper
    • CommentTimeOct 5th 2005 edited
     # 204
    hmm. that really is pretty wierd if theyre all showing up with that query - the migrator really does little else with the data besides reinsert it.
    Are the missing categories not in the lum_categories table or is vanilla just missing them for some reason?

    As for the missing posts, i'd expect them to be related to other problems further up the line, but setting up phpbb using this data would probably be a good double check, certainly.

    I gotta hit the sack now but if you can get back with any results i'll try and check them out before school in the morning or probably before work in the afternoon. Or maybe not till the weekend. We'll see how things go!

    Hmm.. its pretty frustrating that this post wont re-whisper. It's a good job i edited that bit out about thinking vanilla is the worst forum ever!
  3.  # 205
    hmm.. I'm having some trouble with the migrator.zip thingie... it's giving me an error whenever I try converting something, and I can't really make sense of it.

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in mysqldetails.php on line 2
    I cannot connect to the database because: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    I've input all the correct details, but it just won't work. any help would be appreciated.
  4.  # 206
    um. Have you used databases in any other applications? Did vanilla install properly?
  5.  # 207
    I've used mysql before, yes. There were no problems when I installed vanilla either... I tried creating a new mysql administrative user for this modification, but that didn't help either, so it hasn't got anything to do with that.
  6.  # 208
    hmm. That really is rather odd. There is nothing atall special about the way i connect to databases so on the basis that you've done it before with the exact same details i see no reason why it should be unhappy.

    Is your mysql server on the same box that you are using, and if so are you using localhost or servername.com to reference it?
    Has anyone else had this problem before?
  7.  # 209
    well.. I'm using servetheworld, and I have to use an adress to reference the mysql database (localhost won't work, I think). is there something I should change in any of the files, then?

    vanilla installed correctly right away, and it is working, and I don't know what they used as a standard mysql reference, but if it is indeed localhost, that should work.
  8.  # 210
    After checking through the vanilla files, as i suspected, mark is using the standard:
    $Connection = @mysql_connect($DBHost, $DBUser, $DBPass);
    to connect to the database (i dunno if there are any other ways to do it anyway)
    which is almost identical to my:
    $db = mysql_connect ("localhost", "...", "...")

    Have you tried running the migrator again incase it was just a problem at that moment in time? If it's still not working and you're 1000% the details are fine.... ^o)
  9.  # 211
    hahaha! I got it to work. I was being a blind stupid man. I had actually totally ignored the aforementioned "localhost" reference in the mysql_connect... for some reason I accepted it as being correct.. quite possibly because I'm used to using localhost when testing php scripts on my own computer... I've only used three-four scripts that refer to something in mysql before, and each time I remembered to change it, but that's probably because I wrote the code myself then.

    anyway, now I know what that error looks like.

    silly me.

    thanks for your help (though I was being stupid)!
  10.  # 212
    haha. Well i'm glad it was something simple or you had me totally dumbfounded.
    I suppose i shouldnt have made the assumption in my script that it would be localhost but in the majority of cases it is.

    Glad that's sorted anyway, how did the migration go?
  11.  # 213
    the migration went pretty ok. The bbcode got fucked up, but everything else was perfectly fine. I actually hadn't expected the avatars to get transferred, but it even did that!

    maybe you should just use "MYSQLSERVER" instead of "localhost" in the file, and add a comment just above it that says "input the name of your mysql server ('localhost' should work in most cases)" or something...
  12.  # 214
    yeah. i just completely overlooked it.
    I did design it to transfer the avatars but at the same time i'm surprised it actually worked. BBCode is something that still needs doing. I am *very* lazy...
    • CommentAuthorMinisweeper
    • CommentTimeOct 31st 2005 edited
     # 215
    Right. I've finally updated it to take account of BBCode'd posts after realising that theyre actually formatted on the way out not the way in and it was therefore a lot easier than i first thought (which wasnt very difficult anyway)

    Basically now it just checks if there is a < in the post, and if there is it assumes it's HTML, otherwise it assumes its BBCode. If someone would like to make a slightly better check than this then they're more than welcome but as a rule it should do the trick. If you dont want any posts to be html-able then you can comment out that if statement in the comments.php file.

    I also changed localhost to mysqlserver to avoid any future confusion, and added a version number just so we know where people are at for help in the future.

    N.B. You *will* require the BBCode extension to be installed and active to enable the comments to be filtered correctly (likewise for html)

    Updated file is here.

    For those people who have already migrated and want their BBCode posts to work, download this and run it and it might work for you (as yet untested so lemme know how it goes).
  13.  # 216
    I just tested the updater, and it seems to have worked perfectly! I don't see any problems yet, at least. I'll check around a bit and let you know if I find anything.
  14.  # 217
    hmm.. there seems to be a different problem, but I don't really know if it is related to the migration or not. all the migrated posts lost their special characters (æÆ, øØ and åÅ, which are all used quite a bit in norwegian are replaced with "?"). The weird thing about it is that while new posts made after the migration can contain these letters, the norwegian language pack also seems to have a bit of trouble with it, and the font-family should have them (as they ARE displayed in new posts)...
  15.  # 218
    Um. Hmm... chances are my migrator is either failing to correctly read or write a non default charset (i assume it's a different one, atleast?)

    It sounds like there's an error in both the migrator and the language file - i'd love to pass the buck and say it wasnt my fault but if new posts work fine then its obviously having no problem with database reads in the charset specified.
    Chances are the language file could be fixed relatively simply just by re-defining its iso, my migrator, however, i'm not so sure.

    Ideas anyone?
  16.  # 219
    Do the Users have to be imported for it to work properly?
  17.  # 220
    Okay odd.

    So I imported all on yours minisweeper and NOTHING was imported into Vanilla. Even though there's data and a lot of it, in the phpBB database.
  18.  # 221
    um. werd up. has it not put anything into the database even? I assume you changed all the necessary details?
  19.  # 222
    Stuff gets entered but not phpBB data.
    I'm getting categories created

    Test Forum 1 This is just a test forum.

    Over and over, same for discussions. Each time I run the migrator.
  20.  # 223
    Urm..hmmm.
    Didn't you already migrate a while ago? Or is this a new data set?
    Can you give me any more accurate info? Have you cleared the database and run the scripts through in order? Does it give any errors?
  21.  # 224
    k fron the looks of it, it's just posting a default phpBB (category/install setup post) into vanilla each time. even tho the phpbb database is populated.
  22.  # 225
    do you have aim/msn... so much easier.
  23.  # 226
    yeah you can hit me up on bad4ssg@msn.com
    Seems we posted our last comments at the exact same time. Little odd. It got confused at my end...
  24.  # 227
    Right, after some more testing with chris's data, i've made a bunch of changes and now i'm on v0.4 so if anyone is downloading just make sure you've got the latest version. it's still at the same place <a href="http://gez.int0rw3b.com/migrator.zip">here</a>.
    Any trouble give me a shout.
    •  
      CommentAuthorfernando
    • CommentTimeNov 22nd 2005
     # 228
    good work, i know that's not easy. thank you.
  25.  # 229
    thanks a lot bud.

    just to note to everyone, if you have a database with 40,000 posts mini's migrator will handle it ;-)
  26.  # 230
    I'm getting some errors when I run the migrator scripts (v0.4):
    (I tried it on two different servers.)

    users.php

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in (full path to script omitted) ./users.php on line 20

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in (full path to script omitted) ./users.php on line 21


    categories.php

    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in (full path to script omitted) ./categories.php on line 54


    discussions.php

    Parse error: parse error, unexpected '>' in (full path to script omitted) ./discussions.php on line 85


    comments.php

    Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in (full path to script omitted) ./comments.php on line 92


    Let me know if there's anything I can do to help.
  27.  # 231
    Right. Grab the latest from my site (0.4b) and run through it again. I suspect you'll get the same user error, in which case if you could take a look at your phpbb_users table in your database and tell me which of the following columns are missing it'd be appreciated:
    user_id,username,user_password,user_email,user_viewemail,user_avatar,user_posts,user_regdate,user_lastvisit

    I'm not sure why you've got the rest of the errors unless there was some crc error or some such in the upload - as far as i can see there arent any visible problems to create such issues in the script. I know i had a couple similar when i was debugging chris's and i made some changes to the copy on his server which i forgot to put into my code but i think it's all there now so try re-downloading and report back.

    Thanks!
  28.  # 232
    The latest (0.4b) worked OK on my users. (My phpbb_users table contains all the fields you listed.)

    On the other three scripts, I now get:
    Parse error: parse error, unexpected '>' on line "x" (once again the same lines that were originally affected: 54, 85, 92 respectively)

    Interestingly, line "x" in each of these scripts is:

    echo "<br>Number of Errors ".$error;
  29.  # 233
    Yeah, granted. I'm not sure why though since it has no reason to be bothered by the html symbols. Open up each those files and swop the " ''s for ' 's so it doesnt evaluate the contents and give it a go :)
  30.  # 234
    My knowledge of PHP is virtually zero, but I think I've managed to I trace the parse error to the following line in each categories, discussions, and comments:

    echo "<br> ERROR ROW ".$count.";

    Removing that third unmatched double quote seems to fix everything!
  31.  # 235
    Yeah! 8,682 comments migrated in under 75 seconds.
  32.  # 236
    ahh. yeah sorry. I dunno if it's just me but if you've been staring at a piece of code for a while it's impossible to see anything wrong with it - for obvious errors atleast.

    Glad you're all done. Any idea what server you're hosted on? 9k in 75 seems quite a long time but i dunno if thats my code or not.
  33.  # 237
    Server was dual Xeon with SCSI HDs, and all that goodness, but the guy that set it up is long gone and I still find his garbage lying around. I think the config is a bit crufty, so I wouldn't base any performance judgements on it.
  34.  # 238
    Here's a couple minor quirks I've noticed so far with a database migrated from phpBB:

    Every bbCode tag appears to have a random string inserted into it.

    For example:
    [quote:481950223f]Some quote text[/quote:481950223f]

    Comments in each discussion appear in the order they were edited instead of the order they were originally posted. In other words, if the original author edited his or her post in phpBB after other users added to the thread, the original post appears part way down the discussion. The comments are out of order.
    • CommentAuthorSirNot
    • CommentTimeNov 25th 2005
     # 239
    The random string would be the post uid. The migrator should check the uid field of each post and strip them out of the bbcodes.
  35.  # 240
    should is such an unnecessary word. *coughs and tries to divert attention. My bbcode'ing really is extremely rusty - it was much more of an afterthought than a focus. I just wanted to get something working (and that itself wasnt hugely successful!)

    The ordering thing is quite fun though. Hmm.
  36.  # 241
    I'm pretty sure my migrator is writing valid timings. It makes DateCreated from phpbb's post_time and DateEdited from phpbb's post_edit_time so on the assumption that vanilla is ordering by DateCreated then theres no reason it should be mucking it up. Even in the insane instance that vanilla would be ordering by comment ID, the phpbb query comes in post id order and thus they should be kept in the correct order in the database regardless.
    So i'm somewhat befuddled. Can anyone else who's used the migrator confirm or disprove this activity?
  37.  # 242
    Doh, it looks like the post ordering problem is not related to if or when the post was edited,as I originally stated.

    Instead, I think something is going wrong in the conversion of the timestamp from the seconds-since-1970 UNIX format used in phpBB to the YYYY-MM-DD ISO format used in Vanilla. It's as if the function used to convert timestamp formats doesn't take into account the difference between 12 hour and 24 hour time. Every comment that was made after noon has an incorrect time stamp after conversion. For example, a post that was made at 3 p.m. in phpBB has a timestamp of 03:00:00 after conversion to Vanilla, but it should be 15:00:00.

    I think I've traced it to the mysqldetail.php script where the DateTimeFromTimeStamp function is defined. I think the lowercase 'h' below (line 20) should be a capital 'H'.

    return date("Y-m-d h:i:s", $TimeStamp);

    Sorry for the confusion. I hope that helps.
  38.  # 243
    Ahh, how odd. I took that function straight from vanilla so i barely even considered it. If you're happy it works with your suggestion then i'll change it up on the download. Cheers :)
  39.  # 244
    I was able to run the migrator again and confirm that the capital 'H' in place of the lowercase 'h' in the DateTimeFromTimeStamp function does indeed fix the post ordering problem I encountered. (Perhaps in whatever context vanilla uses the function, the distinction between 24 hour and 12 hour time doesn't make a difference.)

    I'm just amazed that I was able to figure it out on my own. This script is much better than what I might have done if I had to do this on my own, which would have been to dump the databases to CSV and clean them up. That would have taken forever. Now, I all I have to do is something about the bbcode problem before I convert for real in a couple weeks. I'll report back if I come up with something.
    • CommentAuthorSirNot
    • CommentTimeNov 26th 2005 edited
     # 245
    Just get the value from the bbcode_uid field and do something like preg_replace("/\[(\/?)(.+):$uid\]/", "[\\1\\2]", $Str); (assuming $uid is the bbcode uid and $Str is the post text). That would, of course, change it to universally recognized bbcodes, you'd have to modify it slightly if you wanted it to convert everything to html.
  40.  # 246
    Hmm. Could be useful SirNot, then again the migrators bbcode functionality needs completely adding when it moves into the universal migrator. Care to join the team?
    • CommentAuthorSirNot
    • CommentTimeNov 26th 2005
     # 247
    There's a team?

    Sure, whatever, although I'm not making any gurantees.
  41.  # 248
    lol. well me and ADM had a bit of a conversation about where to go with it. It's just a matter of stopping being lazy and doing something ^o)
  42.  # 249
    And I like to be the guinea pig for the migrator. Seeing as my DB is phat.
    • CommentAuthortimberford
    • CommentTimeDec 13th 2005
     # 250
    any updates on this guys? does it work with the new vanilla beta release?