Previous Thread
Next Thread
Print Thread
Hop To
Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Before upgrading my board from 7.5.x to 7.7.3 we had been on UBB Classic and the upgrade to 7.5 had been done by the UBB support team. However, since going to 7.5 to 7.7.3 was minor, I did the upgrade myself.

Another issue that was found was that those links that link back to the classic threads are no longer working. One of my peers found a thread explaining the usage of the ubbclassic_6_7_import tool. However, I was unable to find an "importers" directory (and creating one didn't work) so I was unable to get this tool to work.

A. Is there something I'm missing to get it to work

OR

B. is there an alternate fix to this that doesn't involve going through and manually changing all the links (if that would even work?)

Thank you,
Annette


My site is: www.lcficmbs.com (it's open right now lol)
And I'm running on the following:
cPanel 78.0 (build 41)
Apache 2.4.41
PHP 7.0.33
MySQL 5.6.41-84.1
Perl 5.28.0

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
when you downloaded the classic to ubbthreads zip.
There were two extra files
ultimatebb.cgi and ultimatebb.php
Edit those two files for the correct paths. and what type of redirect
Then ftp to the site and replace the same files in the classic folders

Also there is a db table importmap
It holds all the redirects.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Ok, In my original set up only the php file exists, should I still upload both. Also, is this the entry in the DB:

`ubbt_importconfig`


membersdir
c:/wamp/www/old/boards/Members

cgi
c:/wamp/www/old/boards

noncgi
c:/wamp/www/old/ubb

variables
c:/wamp/www/old/boards

noncgiurl
localhost/old

site_id
1

Screen shot here: http://lcficmbs.com/mysqlentry.jpg

In my directory, this is the location of my old boards, after UBB did the upgrade to 7.5
/home3/wildflo3/public_html/lcficmbs/ubb-classic-old

http://lcficmbs.com/LCboardsFTP.jpg

So I'm guessing I would change the setting to match the actual location, using the absolute path since I am on a linux server?

Thank you for the help so far. It's much appreciated!

A


Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
Okay I was trying to figure out where classic was installed. on your site.
from the import classic zip file in the members area..
edit ultimatebb.php and place it at http://www.lcficmbs.com/ubb/ultimatebb.php
edit ultimatebb.cgi and place it probably at http://www.lcficmbs.com/cgi-bin/ultimatebb.cgi Not sure where you had it before. but it should have been in cgi-bin

They were the main executable s for classic. and that is where the urls in your posts point to.
The two new files you are replacing them with are just to redirect them to where the posts are now in ubbthreads..
You don't need a importers folder anymore because the import is done. It was only needed to import classic to ubbthreads.

There is not much to edit in both files it is only like three settings at the top.
New url to ubbthreads.
Redirect type 301 or 302
And if spiderfrendly was used.


Just so you know ultimatebb.cgi was the main program file.
ultimatebb.php was for the php accelerator if it was turned on.
The new files just turn them into glorified redirect scripts to ubbthreads.


Just remember this never did work perfectly for every link.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Thank you so much for the help. As far as I can see it's now working for most posts. There are a few here and there that still aren't working and I've suggested that they be manually fixed.

Hopefully, this will be the last I bug you.

Again, thank you muchly!!!

A

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
It appears that most of the classic urls are not using the spider or search friendly feature.
Maybe you turned it on later in your classic years.
If that is the case in the settings change
$search_friendly = 1;
to
$search_friendly = 0;
In both files.
You can't have both so you need to pick the lesser of two evils.
The reason is the url is different between the two.

Also the reason you have this issue at all is when you imported classic to UBBthreads.
Every reference changed.
Member numbers started at 2 instead of one.
Posts and topics numbers changed because it does topics first then replies(posts)
So if a referring url is a post not a topic it should work.

so that means over the years with deleting and moving posts they all kept incrementing on the numbers with gaps between the numbers..
Now they are in numerical order without gaps..
The same happens when you run the re builders for members.
Over the years they show say 5000 but something like 300 posts have been deleted.
Well the re builder will recount posts and start over.
So the end result is they show less posts.




Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
okay it appears it still does not work at all.

Edit the importer file ultimatebb.php so the settings look like
Quote
<?PHP
//
// Whoops! If you see this text in your browser,
// your web hosting provider has not installed PHP.
//
// You will be unable to use the UBB.classic Accelerator.
//
// You may wish to ask your web hosting provider to install PHP.
// Both Windows and Unix versions are available on the PHP website,
// http://www.php.net/
//
// Originally by Philipp Esselbach <philipp@ntcompatible.com>
// Copyright (C) 2005 Groupee, Inc.
//
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// Groupee, Inc.
//
// You may make modifications, but only for your own use and
// within the confines of the UBB.classic License Agreement
// (see our website for that).
//
// Note: if you modify ANY code within your UBB.classic, we at Groupee, Inc.
// cannot offer you support -- thus modify at your own peril smile

// Replacement ultimatebb.php script. $URL needs to be set to your ubb.threads
// installation.
$URL = "http://www.lcficmbs.com/ubb/ubbthreads.php";

// site_id only needs to be changed if you've imported multiple forums. The importer
// will tell you what your site id needs to be changed to
$site_id = 1;

// What type of redirect shall we send?
// 301 - Permanent
// 302 - Temporary
$redirect = 302;

# Search engine friendly redirects? Change to 0 to disable
$search_friendly = 0;

# You shouldn't need to edit anything below this line

Upload and overwrite the existing file ultimatebb.php at
http://www.lcficmbs.com/ubb/ultimatebb.php


Edit the importer file ultimatebb.cgi so the settings are like below.
Note the first line
#!/usr/bin/perl
That needs to be edited to what your perlpath was in classic

Quote
#!/usr/bin/perl
#
# Copyright (C) 2005 Groupee, Inc.
#
#
# Most of this code stolen straight from the original ultimatebb.cgi
# Thanks to Ian Spence

# Replacement ultimatebb.cgi script.
# $URL needs to be set to your ubb.threads installation.
$URL = "http://www.lcficmbs.com/ubb/ubbthreads.php";

# site_id only needs to be changed if you've imported multiple forums. The importer
# will tell you what your site id needs to be changed to
$site_id = 1;

# What type of redirect shall we send?
# 0 - Don't send a 301/302 header, my webserver does this. (Enable this if 301/302 results in an ISE or blank page)
# 301 - Permanent
# 302 - Temporary
$redirect = 302;

# Search engine friendly redirects? Change to 0 to disable
$search_friendly = 0;


# You shouldn't need to edit anything below this line

Upload and overwrite the existing file ultimatebb.cgi at
wherever the classic script files were before.
Like
http://www.lcficmbs.com/cgi-bin/ultimatebb.cgi
But it could be like

http://www.lcficmbs.com/board/ultimatebb.cgi



Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Thanks. I'm pretty sure I edited everything correctly but I'll double check because you never know then I re-upload them and let you know how it went.

Sorry I've been quiet. My laptop crashed last week so I've been working on it with the bare bones installed until all my replacement parts arrived, the last of which came yesterday, and I spent all day getting all the hardware upgraded. After which I did a full clean install of Windows. Took me just about all day yesterday.

Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Ok, I've tried and it still won't redirect to the older posts. Also when you go just to http://www.lcficmbs.com you get an error because it'll redirect you to http://www.lcficmbs.com/cgi-bin/boards/ultimatebb.cgi.

You need to go directly to http://www.lcficmbs.com/ubb/ubbthreads.php

I'm actually going to need to change the redirect I have set up on the host.

Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
I don't know if this helps.

When I click on an old like like: http://www.lcficmbs.com/ubb/ultimatebb.php?ubb=get_topic;f=1;t=016768

Chrome just shows: Error 500

However, here's what the debugger in FireFox says.

Error loading this URI: Protocol error (unknownError): Could not load the source for http://www.lcficmbs.com/ubb/ultimatebb.php?ubb=get_topic;f=1;t=016768.
[Exception... "Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIInputStream.available]" nsresult: "0x80470002 (NS_BASE_STREAM_CLOSED)" location: "JS frame :: resource://devtools/shared/DevToolsUtils.js :: onResponse :: line 577" data: no]
Stack: onResponse@resource://devtools/shared/DevToolsUtils.js:577:34
onStopRequest@resource://gre/modules/NetUtil.jsm:128:9
Line: 577, column: 0

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
I don't know what to tell you anymore.
Way back when classic was active.
You had cgi and non cgi files to upload when you installed it.
The very same original folders are where you need to place the replacement scripts.
Even though they have the same name they have totally different content and purpose.
The originals were to run ubb classic. The replacements are only to redirect old url links to the new UBBThreads.
For the cgi scripts they need to be in a cgi enabled folder where classic was originally installed..

Plus when classic was created there were two different download zip files.
Because at the time Perl which runs cgi scripts , the paths could be installed from possibly two different locations on the server.
The first line was different. between the two variations.
There were like 4 files but in your case it should only be ultimatebb.cgi now.
Even though it looked like a comment it was not it was a hashbang.
It was either #!/usr/bin/perl or I recall it was #!/usr/bin or was it #!/usr/perl
I can't remember.
It all depends on you server install.

Today when you download the import classic zip there is only one variation (#!/usr/bin/perl)
Which may need to be edited depending on where Perl is installed on your server.

In case you don't know what Perl is, it is like php ,mysql is but it is to interpret and run .cgi files. usually installed by your host..
So you need to know your perl path. in advance and edit the various cgi files for the proper path to Perl.


I would suggest to verify the redirect scripts ultimatebb.cgi and ultimatebb.php are setup correctly , and in the proper locations is to give someone access to at least ftp.
Just to rule out at least this part.

Then as I said before the scripts are not perfect.
And have not been updated in many years.

They just don't have the priority they did 19 or so years ago. Since Classic went End of Life..
But it is still supported to a point but only for converting to UBBThreads.

Besides there is only one advocate of Classic that I know of and that is JAISP. .
He is a member here and he is the last die hard that I know of that used classic till just recently.
So he would probably be the best reference for classic.

Most all the members here moved on to UBBThreads many years ago.

I hope this was informative and helpful.



Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Thanks for all you're done and I'll take a look at what you just suggested. While we've been trying to get this to work, one of my team members was working on a contingency plan: putting together a team of folks who might want to go in and see if manual changes can be done. Right now he's looking at a copy of the uubt_POSTS table to see if there's also an option there.

We have a good team at out website, too, so it's not going to hurt to try that angle -- I do have a back up of them off line when you guys did the last upgrade from classic to 7.5.x.

We do thank you for all the hard work, though. The manual changes was a last ditch attempt to get this to work and it looks like that's where we are now.

Again, thank you for all the hard work you have put into this. I hope you know that we appreciate it VERY much.

Thank you,
A smile

Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
Way back when the software was written to redirect to the new post the "http://www.lcficmbs.com/ubb/ultimatebb.php?ubb=get_topic;f=1;t=016768" would have worked with the way the UBB Software was written however over the years the software changed in the Threads parsing if that's what you want to call it. When the software took your old files and made them into the MySQL Database equivalent it had taken them one forum at a time to each topic at a time like today’s layout. The difference is how ubbthreads.php has changed.

Old Way:
http://www.lcficmbs.com/ubb/ultimatebb.php?ubb=get_topic;f=1;t=016768

New Way:
http://www.lcficmbs.com/ubb/ubbthreads.php/topics/16768

Someone COULD sit down and update the redirect software that still programs in the Perl language that understands the changes in the new software and make it work but it really isn’t worth the time it takes to do the job.

Joined: Jul 2006
Posts: 116
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 116
Likes: 4
There are three PHP 7 incompatibilities in the redirection script:

1) Line 55

Replace:
PHP Code
set_magic_quotes_runtime(0); 
With:
PHP Code
//set_magic_quotes_runtime(0); 

2) Line 91

Replace:
PHP Code
$query_string = split('[;&]', trim($qs)); 
With:
PHP Code
$query_string = preg_split('/[;&]/i', trim($qs)); 

3) Line 109

Replace:
PHP Code
$pathinfo = split('\/', trim($pi)); 
With:
PHP Code
$pathinfo = explode('/', trim($pi)); 

This should fix the 500 error

Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Thanks, Philipp, I gave it a try and I still get the same error.

Joined: Jul 2006
Posts: 116
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 116
Likes: 4
Add right after:
PHP Code

<?PHP

the following line:
PHP Code
ini_set( "display_errors", true ); 
and then post the output here.

This will show all errors in the script rather then just showing the 500 error page.

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
When and if I get some time I will look into it.
But for topics:
http://www.lcficmbs.com/ubb/ultimatebb.php?ubb=get_topic;f=1;t=016768
Will redirect if it becomes:
http://www.lcficmbs.com/ubb/ubbthreads.php/topics/016768.

So maybe we need to strip out some functions.
Or the whole redirect script is improperly installed..
I don't have a clue without access to the files.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
Ruben don't you have access to on old board in Perl archived or the ability to set up something to try to rewrite the old software for today's PHP working scripts?

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
I can setup a test board.
I have one in xampp but it is disabled because I changed to wamp and never added perl.
It is just I am in the middle of converting a magento store to woocommerce right now.
So the only free time I have is waiting for import scripts to run.

I would think if anyone would have a functional classic board it would be you. grin


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Hey guys, I'm getting the emails but please bare with me for a few days. I have some RL medical stuff going on. Thanks.

Joined: Nov 2006
Posts: 18
A
Stranger
Stranger
A Offline
Joined: Nov 2006
Posts: 18
Also, if you need any type of access to my boards let me know and I can set something up and email you the info

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
Phillip it appears you were spot on.
Still waiting on the user for validation and still have the cgi script to deal with.
But the first issue was the settings were completely wrong.
So I uploaded a virgin copy.
Added your suggestions except for show errors.
Did not need that once the path was correct.
The errors started to appear or it would redirect to a invalid path.
Once I added your suggestions it started to work, so it seems,

Waiting on feedback.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jul 2006
Posts: 116
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 116
Likes: 4
The cgi redirection script should work fine

At least Perl 5.28.1 (from Debian 10 - released earlier this year) found no issues:
Code
$ perl -c ultimatebb.cgi
ultimatebb.cgi syntax OK


Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
Well the cgi script does not work and it is to much bother to fix.

Only if I set it to 0 for redirects will it even redirect to the forum summary page.
So far everything I tried it skips the redirect to the post and jumps to the summary. on the else if line.

So I am done screwing with it when the alternative should take a whopping 10 minutes.

So the easy way is a DB update query to change the url from using a cgi redirect to a php redirect script.
Because they work now
Should take moments when I get access.

And yes I already tried the execute query in UBB CP but I get a memory exhausted error.
So I need cpanel access.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jul 2006
Posts: 116
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 116
Likes: 4
I see. You need to replace all:
Code
print(qq~Status: HTTP/1.1 301 Moved Permanently\n~ );
Code
print(qq~Status: HTTP/1.1 302 Moved Temporarily\n~ );

with:
Code
print(qq~Status: 301 Moved Permanently\n~ );
Code
print(qq~Status: 302 Moved Temporarily\n~ );

The redirection URLs are also outdated. You need to replace:
Code
print(qq~Location: $URL/ubbthreads.php/ubb/showflat/Forum/$in{'f'}/topic/$in{'t'}/Number/$in{'p'}/site_id/$site_id#import\n\n~);
with something like:
Code
print(qq~Location: $URL/ubbthreads.php/topics/$in{'t'}/\n\n~);

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
Well the fix for the redirect header allows me to select a redirect of 301 or 302 now. instead of 0

But I already tried the other items.
In fact I tried them again.
It still skips down to. the line
Quote
print(qq~Location: $URL/ubbthreads.php/ubb/cfrm\n\n~ );
Which just displays a forum summary.

As I said I am not going to screw with the cgi script anymore.
I will just dive in the database and change the url's to use the php redirect script instead of the cgi one..

Don't worry about it Phillip.


Last edited by Ruben; 10/30/2019 2:38 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jul 2006
Posts: 116
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 116
Likes: 4
Indeed. I looked into this issue and figured out that the cgi redirection script is only supporting search engine friendly URLs like ultimatebb.cgi/topic/12983.html, but not regular URLs like ultimatebb.cgi?ubb=get_topic;f=3;t=12938

Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
I thought the same thing when I looked at it.
But I kept playing with it till I got frustrated.

Bottom line.
The update queries to change them to use the php redirect took a whopping 40 seconds.
So it works now using the php script.
Now I had to rebuild posts so the actual url displayed the new path , even though they worked.
That took about 15 minutes.

An unrelated item is The flashing PM indicator will not turn off for me.
A quick look it appears to be the welcome message. The unix time stamp read says 1.
But I never got it at all , to read.
But this is another topic.


So for this Topic I consider it closed.

Last edited by Ruben; 10/31/2019 1:24 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Forum Privacy Policy
by ECNet - 02/26/2024 11:58 AM
Who's Online Now
2 members (Geoff, domspeak), 353 guests, and 190 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)