Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (Gizmo), 35 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/07/07
Posts: 4
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 14
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 2 1 2 >
Topic Options
#184205 - 05/13/07 01:52 AM Problem importing categories from UBB.Classic
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
I've been using UBB.Classic 6.3 for a long time, and decided, with 300k posts, to upgrade to UBB.threads. I reindexed everything and successfully upgraded to UBB.Classic 6.7, and then installed PHP, MySQL, phpMyAdmin, and UBB.threads. After getting all those new programs configured, and making it through the UBB.threads setup scripts, I started importing my old UBB.Classic 6.7 data. Everything started out fine; it imported all of the member data without a hitch. But when it got to the 'classic_import.php?ubb=categories' page, it died with a simple message:

Importing category: "General Discussion (default)"

I don't have any categories, so I tried creating one (in UBB.Classic), and setting all the forums to use it. Same message. I put it back, and tried navigating to the 'classic_import.php?ubb=boards' page, but that just returns:

Importing forum: "shanesforum1"

Any ideas? Note that I've checked the returned HTML and found no error messages -- after the message is just <br />.

Also, is there an easy way to dump the contents of the MySQL database so I can try the import fresh again? As much as I know about VB, C#, and Access, I'm not a pro at MySQL or PHP.

Thanks in advance,

Shane
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#184211 - 05/13/07 11:49 AM Re: Problem importing categories from UBB.Classic [Re: Shane]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
It *could* be that it's running into an error and php is configured to not display errors to the browser. If you have access to the php.ini file you can check this, I believe it's display_errors or something like that.

As for dumping the contents of the database and starting fresh. Basically all you need to do is drop all of the tables or the entire database if UBB.threads is the only thing inside and then rerun the install/createtable.php script.
Top
#184213 - 05/13/07 12:53 PM Re: Problem importing categories from UBB.Classic [Re: Rick]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
Thanks, now I can see the error message. It is:
 Quote:
Importing category: "General Discussion (default)"

Warning: html::include(languages//generic.php) [function.html-include]: failed to open stream: No such file or directory in D:\Data\Inetpub\websites\mywebsite.com\ubbthreads\libs\ubbthreads.inc.php on line 799

Warning: html::include() [function.include]: Failed opening 'languages//generic.php' for inclusion (include_path='.;C:\php5\pear') in D:\Data\Inetpub\websites\mywebsite.com\ubbthreads\libs\ubbthreads.inc.php on line 799

Notice: Smarty error: unable to read resource: "not_right_bare.tpl" in D:\Data\Inetpub\websites\mywebsite.com\ubbthreads\libs\smarty\Smarty.class.php on line 1088


It seems that it isn't adding the word 'english' in the pathname. I checked the 'languages' page of the control panel; English is set as default and active. What should I check next?
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184215 - 05/13/07 01:59 PM Re: Problem importing categories from UBB.Classic [Re: Shane]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
p.s. Oops! It looks this thread should be under the Importing forum...
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184233 - 05/13/07 11:56 PM Re: Problem importing categories from UBB.Classic [Re: Shane]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
Looks like you don't have a default language set?

(languages//generic.php)
_________________________
- Allen
- ThreadsDev | PraiseCafe
Top
#184234 - 05/14/07 12:25 AM Re: Problem importing categories from UBB.Classic [Re: AllenAyres]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
It looks that way, but English is set as default and active in the control panel. I'm hazarding a guess that line 799 in ubbthreads.inc.php should reference $config['LANGUAGE'] not $user['USER_LANGUAGE'], but I don't know. In any case, fixing that won't work, because it's trying to find the languages folder as a subfolder of the importers folder. And even if I copy the languages folder to the importers folder, I still get the Smarty error, and I have no idea how to fix or patch that.
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184238 - 05/14/07 10:51 AM Re: Problem importing categories from UBB.Classic [Re: Shane]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Hmm, it's actually triggering the not_right error function which *should* never happen during an import. I need to see why that's happening as it should bypass that if an error is encountered and just display it in raw html.
Top
#184242 - 05/14/07 03:30 PM Re: Problem importing categories from UBB.Classic [Re: Rick]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
FYI, the error was occuring in the first do_placeholder_query line after it echos the "Importing Category:" line (sorry, I don't know the line #). Apparently, it was trying to insert null values into the database (all three fields), which is not allowed. The source vars_cats.cgi file had only a CRLF in it, which I removed, and then the script ran fine and passed into the next stage - importing the forums. But now I'm stuck there with the exact same 'smarty' error -- probably another DB problem. It sure would help if it printed the errors! I'll keep you posted if I can figure out anything else. Please let me know if you find a way for the script to print the error messages. Thanks!
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184243 - 05/14/07 03:47 PM Re: Problem importing categories from UBB.Classic [Re: Shane]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
It seems that it couldn't import the forums because of a similar problem: it tried to insert a null value in the categoryid field, instead of inserting '1' in there. I patched it, and then it imported the forums and is now cheerfully importing posts upon posts...

I had already tried creating a category and assigning all the forums to it, but for some reason that didn't work. I would suggest that you update your import scripts to handle an empty vars_cats.cgi file and uncategorized forums -- and of course, show database errors so these problems can be fixed easier.

Thanks!

Shane
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184266 - 05/14/07 11:56 PM Re: Problem importing categories from UBB.Classic [Re: Shane]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
Rick,

Now I'm running into more errors while importing some of the posts. If you could track down that bug that's causing the database errors to be hidden (because it's trying to load the 'not_right' error function), it would sure make fixing these import scripts easier! I will keep you posted as I continue to diagnose my import.

Thanks,

Shane
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184282 - 05/15/07 10:42 AM Re: Problem importing categories from UBB.Classic [Re: Shane]
Ian Spence Offline
Registered: 06/04/06
Posts: 255
Try doing the following in /libs/mysql.inc.php

Find: (Line 334)

 Code:
		if (defined('ADMINISTRATORS')) {
			global $admin;
			$admin->error($show_error);
		}
		else {
			$html -> not_right_bare($show_error);
		}


Change to

 Code:
		if (defined('ADMINISTRATORS')) {
			global $admin;
			$admin->error($show_error);
		} else if (defined('IS_IMPORT')) {
			echo $show_error;
		}
		else {
			$html -> not_right_bare($show_error);
		}


Now, at the top of classic_import.php, add

 Code:
define('IS_IMPORT', true);


This is obviously a kludge, but this should work. (If it doesn't, you just need to add more code various places)

Rick, I'm gonna send you my rewritten version of mysql.inc.php that handles this cleaner
Top
#184299 - 05/15/07 04:25 PM Re: Problem importing categories from UBB.Classic [Re: Ian Spence]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
That helps SOOOO much, thank you!

Now I know what my next problem is: "Data too long for column 'POST_BODY' at row 1"

I found the spot to insert the line of code, but I don't know PHP. Can anyone translate this code to PHP for me? (I've done a mockup in VB/C)

if (Len($raw_post) > MAX_POST_LENGTH) {
$raw_post = Left($raw_post, MAX_POST_LENGTH)
}

Also, I don't know what the maximum posting length is. I examined the field with PHPMyAdmin, but it didn't seem to show a maximum length for the field. As the field is of type 'text', I'm actually surprised that there's a length limitation at all.

Thanks in advance,

Shane
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
#184300 - 05/15/07 04:54 PM Re: Problem importing categories from UBB.Classic [Re: Shane]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
If you have a lot of long posts, you can change the length of the POST_BODY and POST_DEFAULT_BODY fields to hold a longer value. By default, text fields will hold 65,535 characters.

If you want to allow more, you can alter the database with the following SQL command:

alter table ubbt_POSTS change POST_BODY mediumtext, change POST_DEFAULT_BODY mediumtext
Top
#184302 - 05/15/07 05:47 PM Re: Problem importing categories from UBB.Classic [Re: Rick]
Shane Offline
journeyman
Registered: 02/12/07
Posts: 85
Thanks, I edited the createtable.php script and started fresh; it's importing now.
_________________________
RnJpZW5kc2hpcCB3aXRoIHRoZSB3b3JsZCBpcyBob3N0aWxpdH
kgdG93YXJkcyBHb2QuICBKYW1lcyA0OjQ=
Top
Page 1 of 2 1 2 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10489 Members
36 Forums
33841 Topics
181707 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image