PDA

View Full Version : UBB Classic v6.61 to vb3.08 import fails (New member)



Ziroc
Mon 8th Aug '05, 1:12am
I run the latest version of PHP and mySQL on a Windows 2000 server.

When I go to import the users, it failed on a few users that had " ' "s in the email address (not quotes, but ' ) anyway, I go del that user, and it continues fine. only 4 users had those chars.

All goes well with everything until I get to importing actual posts (after threads/headers) and the below error is what I get. I believe it doesn't like the ' as well in the "don't" because it starts off with "syntax to use near 't speak. <br>" see? the first character is ' .

After it fails, I go back, and it doesn't let me continue, so I go to reset the database in vb (remove all imports) and I can again import, but all the users I imported are still there!! Weird. but the import list shows 0 done.

Any help?? I just bought this, and I'm scared I don't know what to do. :(
Please help. Thank you!


===============================================
Database error in vBulletin:ImpEx Target 3.0.8:

Invalid SQL:
INSERT INTO vb3_post
(
threadid, userid, importthreadid,
parentid, username, title,
dateline, pagetext, allowsmilie,
showsignature, ipaddress, iconid,
visible, attach, importpostid
)
VALUES
(
'184',
'508',
'183',
'',
'Aurum',
'',
'970734000',
':\'-( Cry.
Sadness.
:-I Indifference.
Laughter.
Smile.
:-0 Sorprise.
Blink.
) Very happy.
:-7 Forced smile.
:-P Half enserio half joking.
:-* Kiss.
( Very sadness.
|-0 Yawn.
:-| ¡Hum!
:-',
'1',
'',
' Mad.<br> %-) Confused.<br> :-x I don't speak. <br> :-& Silent. <br> :-/ Undecided. <br> :-@ Screaming. <br> :-u Screeching. <br>__________________________________________________ __________________________________________<br><br> When the world of the deads comes,<br>we will already be there.',
'',
'1',
'',
'1'
)

mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't speak. <br> :-& Silent. <br> :-/ Undecided. <br> :-@

mysql error number: 1064
=================================

Jerry
Mon 8th Aug '05, 3:44pm
Which latest versions are you running ?

ImpEx addslashes() page content before storing it, so its going to be something with PHP on windows choosing not to do it I'm thinking.

Ziroc
Mon 8th Aug '05, 4:47pm
Which latest versions are you running ?

ImpEx addslashes() page content before storing it, so its going to be something with PHP on windows choosing not to do it I'm thinking.

I'm using PHP 4.40 (no betas) and
SQL server v4.1.13-win32


I just blew everything out, I reinstalled SQL server and reinstalling vb3 fresh, and will try again. when you successfully import users and thread, then I tried forum posts and it gives me that error, and when I tried to go back (deleting session but not the imported stuff) I get back to the list of things to import, and it shows nothing as imported. and I am forced to re-enter paths and all the same stuff again.

Help! :) Thanks for the quick reply!!

Jerry
Mon 8th Aug '05, 5:08pm
Thats because your are deleting just the session not the imported data so there will be lots of duplicates as well as the paths being lost, as they are stored in the session.

If the addslashes() isn't working on the SQL insert all I can think at the moment is adding another one to the post module.

impex/systems/ubb_classic/007.php line 328 :



$try->set_value('nonmandatory', 'pagetext', $this->local_html_2bb($this->html_2_bb($postbits[6]),1,1));


Add an addslashes() so its :




$try->set_value('nonmandatory', 'pagetext', addslashes($this->local_html_2bb($this->html_2_bb($postbits[6]),1,1)));


Its strange as from your output, some of the quotes are being slashed.

Ziroc
Mon 8th Aug '05, 5:25pm
I'm converting from UBB 6.61 though. does the converter use this file anyway?

Jerry
Mon 8th Aug '05, 5:29pm
I'm converting from UBB 6.61 though. does the converter use this file anyway?

My bad, have updated the post, I was doing a few things at once.

Ziroc
Mon 8th Aug '05, 5:40pm
No worries, I understand totally! I do the same thing :) I've inserted it and when it gets to importing posts, I'll let ya know how it goes.

BTW, I'm importing users, and every once and a while, I'll get a:

Warning: mktime(): Windows does not support negative values for this function in \impex\ImpExFunction.php on line 166

Here is the code: "$birthday = mktime(0,0,0,$date_bits[1],$date_bits[2],$date_bits[0]);" I googled it, and it said birthdays before 1970 caused this bug? Is this right? Anyway, it still imports the user fine :)


Thanks Jerry, you rock! Will let ya know how it goes!!

Dan Huling

Jerry
Mon 8th Aug '05, 5:44pm
It comes from corrupt or miss parsed dates, and as the mktime() warning says windows can't handle that so its set to 0.

Ziroc
Wed 10th Aug '05, 12:53am
It comes from corrupt or miss parsed dates, and as the mktime() warning says windows can't handle that so its set to 0.

Awesome news, all imported great!!! Thanks a million Jerry! I reset the counters and all posts and thread counts show up, but one issue:


ALL the posts are closed.. ??? How can I open them all??

Thanks, thats the only tiny issue I have, then it's style editing time! :)

Jerry
Wed 10th Aug '05, 3:25pm
How strange ! anyway ...this SQL will open ALL the threads :



UPDATE vb3_thread SET open =1;