News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

vBulletin 3.5 converter errors

Started by B3aker, August 18, 2013, 05:16:15 PM

Previous topic - Next topic

emanuele

Well, well...at the moment I don't really have any idea of what is broken...

I'll try again tomorrow morning...


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

B3aker

Hey. Was just curious if you thought of a solution. Thanks! :)
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

B3aker

I was looking at the code a bit. I wonder if it's an error in the code perhaps? Maybe not matching up to my vb database tables?

******************************************************************************/
--- Converting avatars...
/******************************************************************************/

---* {$to_prefix}attachments
---{
$no_add = true;

if (!isset($vb_settings))
{
$result = convert_query("
SELECT varname, value
FROM {$from_prefix}setting
WHERE varname IN ('attachfile', 'attachpath', 'usefileavatar', 'avatarpath')
LIMIT 4");
$vb_settings = array();
while ($row2 = convert_fetch_assoc($result))
{
if (substr($row2['value'], 0, 2) == './')
$row2['value'] = $_POST['path_from'] . substr($row2['value'], 1);
$vb_settings[$row2['varname']] = $row2['value'];
}
convert_free_result($result);
}

$file_hash = getAttachmentFilename($row['filename'], $id_attach, null, true);
$physical_filename = $id_attach . '_' . $file_hash;

if (strlen($physical_filename) > 255)
return;
if (empty($vb_settings['usefileavatar']))
{
$fp = @fopen($attachmentUploadDir . '/' . $physical_filename, 'wb');
if (!$fp)
return;

fwrite($fp, $row['filedata']);
fclose($fp);
}
elseif (!copy($vb_settings['avatarpath'] . '/avatar' . $row['id_member'] . '_' . $row['avatarrevision'] . '.gif', $attachmentUploadDir . '/' . $physical_filename))
return;
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

emanuele

The error comes from SMF's "database abstraction layer", it complains because it finds that a certain field should be inserted/read ('filename'), but the corresponding value is not present in the arguments of the query... meh, that explanation doesn't sound right, let's do an example:
$smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}attachments
WHERE filename LIKE {string:filename}',
array(
'not_filename' => 'a string',
)
);

in that case, in the array there is no index "filename" at it would raise that error.
Correct version would be:
$smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}attachments
WHERE filename LIKE {string:filename}',
array(
'filename' => 'a string',
)
);


Something similar may happen with db_insert.
Though I can't see where and how that could fail...

The fallback is as before remove that piece of code, it is not nice for your users though... :(

ETA: another thing you may try, is to add "debug=1" to the url when you start the conversion, this should give you more info on the actual error (hopefully...), so for example:
http://localhost/forum/index.php?debug=1


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

B3aker

I'll give the debug method a try and let you know. If I remove that bit of code, what would happen to the users? They would lose their avatars?
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

B3aker

This is the first message that pops up when I did the debug.

QuoteNotice: Undefined index: convert_script in /home/content/79/11133879/html/forum/convert.php on line 66Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/79/11133879/html/forum/convert.php:3167) in /home/content/79/11133879/html/forum/convert.php on line 79Notice: Undefined index: step in /home/content/79/11133879/html/forum/convert.php on line 104Notice: Undefined index: start in /home/content/79/11133879/html/forum/convert.php on line 105

and then this

QuoteNotice: Undefined index: convert_script in /home/content/79/11133879/html/forum/convert.php on line 66Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/79/11133879/html/forum/convert.php:3167) in /home/content/79/11133879/html/forum/convert.php on line 79Notice: Undefined index: start in /home/content/79/11133879/html/forum/convert.php on line 105
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

emanuele

As long as the converter continues his work these should be irrelevant...


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

B3aker

Quote from: emanuele on September 09, 2013, 12:46:16 PM
The error comes from SMF's "database abstraction layer", it complains because it finds that a certain field should be inserted/read ('filename'), but the corresponding value is not present in the arguments of the query... meh, that explanation doesn't sound right, let's do an example:
$smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}attachments
WHERE filename LIKE {string:filename}',
array(
'not_filename' => 'a string',
)
);

in that case, in the array there is no index "filename" at it would raise that error.
Correct version would be:
$smcFunc['db_query']('', '
SELECT *
FROM {db_prefix}attachments
WHERE filename LIKE {string:filename}',
array(
'filename' => 'a string',
)
);


I just looked for this line of code in the convert.php and the vbulletin35_to_smf.sql file and I can't find it anywhere to modify or remove it. Maybe that could be the problem?
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

emanuele

Sorry for being slow in this period and sorry for the misunderstanding: that was just an example of code, not actual code you would find in the converter.
What you can remove is any thing after this:
******************************************************************************/
--- Converting avatars...
/******************************************************************************/

including that three lines.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

B3aker

Quote from: emanuele on September 13, 2013, 09:46:13 AM
Sorry for being slow in this period and sorry for the misunderstanding: that was just an example of code, not actual code you would find in the converter.
What you can remove is any thing after this:
******************************************************************************/
--- Converting avatars...
/******************************************************************************/

including that three lines.

Ah. Gotcha. I'll remove that today and give it a run. If the members lose their avatars, so be it. They can reupload them. I posted a topic a couple days ago telling them to save them if they really care about them. Just hope they read it and followed my advice.
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

B3aker

Ugh. I took out the converting avatars section from the converter and ran it again. I keep getting this error in the beginning. I repaired and optimized all my tables as I did the last time I had this error come up and I still keep getting it

QuoteConverting members...
Incorrect key file for table '/tmp/mysqltmp/#sql_7ea0_0.MYI'; try to repair it
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

emanuele

That again is a mysql error and an issue with a corrupt table, nothing that the converter can cause or solve... :(

What I would try if you continue getting them is reduce the number of members processed at a time changing:
---* {$to_prefix}members
to for example:
---* {$to_prefix}members 50
or something smaller than 50, this should reduce the load, not sure if it helps in any way...


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

B3aker

*sigh* New error I've never seen before. I wonder if all the tries of the conversion somehow corrupted my database. Would it make sense to do a fresh install on a new database?

QuoteConverting topics...
Unsuccessful!
This query:

    SELECT
    t.threadid AS id_topic, t.forumid AS id_board, t.sticky AS is_sticky,
    t.pollid AS id_poll, t.views AS num_views, t.postuserid AS id_member_started,
    ul.userid AS id_member_updated, t.replycount AS num_replies,
    IF(t.open, 0, 1) AS locked, MIN(p.postid) AS id_first_msg,
    MAX(p.postid) AS id_last_msg
    FROM `PSX4CentralSMF`.thread AS t
    INNER JOIN `PSX4CentralSMF`.post AS p ON (p.threadid = t.threadid)
    LEFT JOIN `PSX4CentralSMF`.user AS ul ON (ul.username = t.lastposter)
    GROUP BY t.threadid
    HAVING id_first_msg != 0
    AND id_last_msg != 0
    LIMIT 0, 500;

Caused the error:

    Table './PSX4CentralSMF/post' is marked as crashed and last (automatic?) repair failed
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

mentalist

Quote from: B3aker on September 15, 2013, 11:42:57 PM
*sigh* New error I've never seen before. I wonder if all the tries of the conversion somehow corrupted my database. Would it make sense to do a fresh install on a new database?
Don't believe so... It is probably a server's harddrive failure .. Contatct your host.

emanuele

You should really export the db and work on a local copy on your computer...
All these errors are caused by the server itself, the converter can't do anything, I'm sorry.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

B3aker

Holy crap dude. Completely forgot to respond back yesterday. I let the converter run over night a couple nights ago and it worked on my working database. I then made a new updated database with the latest posts and everything, ran it again and it worked first time. I was so excited I dove right into fixing forum settings and getting things in order and learning how to use my admin control panel I completely forgot to respond (I am really enjoying SMF and looking forward to seeing what other cool addons and stuff this community has to offer).

It must have been mostly server errors. Thinking about it, Go Daddy did a complete overhaul on their site at the time I started to see these weird errors that had nothing to do with the converter. I was having issues logging in and even looking at my files so I'm sure they did some work to their infrastructure too and resulted in being a bit buggy for a few days (seems to be fine now).

Thank you so much for all your support you gave me here and your patience. If it wasn't for you, I don't know what I would have done. Thank you again :)
PSX4Central Since 1999, quite possibly the oldest PlayStation Community on the net

Advertisement: