Convert vB 4.0.3 to SMF 2.0.19 - Stuck @ 'Converting Members'

Started by CapnK, June 30, 2025, 05:58:22 PM

Previous topic - Next topic

CapnK

OK, so I did much reading and research before (and now, during) trying the conversion. The vB4 converter thread starts out saying to use SMF 2.0-rc3, but later posts say that it works with later versions. Seeing several mentions of 2.0.19, I tried that first. After fixing the first error (re: removing "SET SQL_MAX_JOIN_SIZE" from convert.php), it started running and then hung up at the 'Convert Members' point, so I tried to go back further...

I gave a try at installing 2.0-rc3, but that would hang up trying to use postgresql, and I could not get a connection to my MySQL db (LAMP server) even after trying to change that in the settings.php file...

So I'm back to 2.0.19 to try again, because at least this version has shown *some* progress.

The issue is that the converter runs, db is accessed OK, and converter starts converting - but then hangs at "Converting Members...".

I can look at the SMF db in phpMyAdmin and see that table names have apparently been imported from the vB database.

EDITI have looked for an error log so that I can see what and why it is failing, and cannot find one. Is there a log? I'm not getting any error emails at the address I used during config.
Found the error log - it must not have been being generated in my prior attempt. WIll start working my way thru errors.

I've set my server to use php 7.3 for now, for compatibility reasons. DB version: 10.6.22-MariaDB-cll-lve-log

At a loss here. Would really like to get this old forum moved over to this better solution. :) Any ideas?

TIA!

CapnK

Would have liked to add this to the above, but I guess it timed out.

By commenting out the offending lines (per the log), I get a large chunk of the db converted, but not *all* of it. Obviously, I am not a coder - yet over the years I have figured out how to, well, figure out what is supposed to be happening, and where it's not. So I'll be researching the below, and in the meanwhile if anyone has any help or hints, feel free to chime in!

EDIT: It looks like "ADO" is a Windows-only, Azure thing. As I'm running on LAMP w/MySQL - seems I could just delete the ADO-related code content...? Anyone? Bueller? ;)

From the error log:

[30-Jun-2025 23:58:45 UTC] PHP Notice:  Undefined property: mysqli_result::$EOF in /home/xxx/forum/convert.php on line 2731
[30-Jun-2025 23:58:45 UTC] PHP Notice:  Undefined property: mysqli_result::$Fields in /home/xxx/forum/convert.php on line 2735
[30-Jun-2025 23:58:45 UTC] PHP Notice:  Trying to get property 'Count' of non-object in /home/xxx/forum/convert.php on line 2736
[30-Jun-2025 23:58:45 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method mysqli_result::MoveNext() in /home/xxx/forum/convert.php:2741
Stack trace:
#0 /home/xxx/forum/convert.php(1261): convert_fetch_assoc(Object(mysqli_result))
#1 /home/xxx/forum/convert.php(62): doStep1()
#2 {main}
  thrown in /home/xxx/forum/convert.php on line 2741



The relevant lines of code:

Line 1261
while ($row = convert_fetch_assoc($special_result))
          {
            if ($special_code !== null)
            eval($special_code);

// Here we have various bits of custom code for some known problems global to all converters.
      if ($special_table == $to_prefix . 'members')
    {
// Let's ensure there are no illegal characters.
      $row['member_name'] = preg_replace('/[<>&"\'=\\\]/is', '', $row['member_name']);
      $row['real_name'] = trim($row['real_name'], " \t\n\r\x0B\0\xA0");

      if (strpos($row['real_name'], '<') !== false || strpos($row['real_name'], '>') !== false || strpos($row['real_name'], '& ') !== false)
      $row['real_name'] = htmlspecialchars($row['real_name'], ENT_QUOTES);
                            else
      $row['real_name'] = strtr($row['real_name'], array('\'' => '&#039;'));



...which goes out to the line starting at 2731...

// Okay, the hardest is ADO (Windows only, by the way.)
    if (!is_resource($result) && is_object($result))
    {
        //if ($result->EOF)
        //    return false;

        $row = array();
        $fields = $result->Fields;
        for ($i = 0, $n = $fields->Count; $i < $n; $i++)
        {
            $field = $fields[$i];
            $row[$field->Name] = $field->Value;
        }
        $result->MoveNext();

        return $row;
    }

CapnK

Best (and only working) solution I have found yet:

Use SMF version 2.0.13, php5. Got a few errors connecting user to db initially, but eventually they self-corrected.
Once that happened, conversion worked up to the last step of "Recalculating Statistics... Error Duplicate column 'id_member'".
I have been unable to find or fix that. As the forum seems to run fine otherwise, not going to spend any more time on it.

Advertisement: