Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: RoadRanger on June 06, 2024, 08:25:17 PM

Title: Importing data from V1
Post by: RoadRanger on June 06, 2024, 08:25:17 PM
I had a V1 board running but just had to change webhosts. I never updated it to V2 - or even the latest version of V1 - because I had a number of mods in it that I didn't want to lose at the time. The activity on that board pretty much died out as did the product it was supporting. So now I want to start with a fresh install of V2 and import the data somehow. This new board's purpose is mostly to preserve the old posts so losing the mods is no longer an issue.

I do have a backup of the files from the old server and a backup of the SQL database. I tried the obvious of deleting the contents of the newly created database and importing the old - and when that didn't work I restored the contents of the new database and imported the old over it. No joy :(

Is there some easy way to do this? I'm not looking forward to deleting V2 to get V1 installed and upgrading from there :/ . I would think that there would be an easy way to just upgrade the old V1 database and replace the V2 database contents with that?

Thanks!
Title: Re: Importing data from V1
Post by: Kindred on June 06, 2024, 10:39:18 PM
If you have the 1.0.x database
Then...

You will need to be using php 5.3 or 5.4, I believe
Load the 1.0.x files
Install to a clean database
Then use repair_settings.php to reset the values to point to the OLD database.  Once you have that running...

Update to php 7
Although you SHOULD be able to go directly to 2.1.4, several people have had difficulties...  so I suggest loading the 2.0.19 upgrade files and run upgrade.php --

Update to php 8.0
Then do the same process to upgrade to 2.0.14
Title: Re: Importing data from V1
Post by: RoadRanger on June 06, 2024, 11:12:14 PM
Yeah, I was afraid that would be the case. I think I'm just going to install 1.x and leave it on that version as this only needs to be accessible for it's old content.

Thanks!
Title: Re: Importing data from V1
Post by: Kindred on June 07, 2024, 06:44:09 AM
That is not a good idea.
1.0.x and 1.1.x are past end of life.
Not only are there known security vulnerabilities,  but they require old versions of php and mysql that have their own security vulnerabilities.


If you plan to keep a site online,  at all,  then you MUST keep it updated.
Title: Re: Importing data from V1
Post by: RoadRanger on June 07, 2024, 03:44:48 PM
Well, I finally figured out why my copy of the original site failed to run - wrong PHP version. Thanks for kindof pointing me that way. The lowest version of PHP available on my new host is 5.6 but that seems to work.

Just for those following along I just copied the whole of the old folder into the new (emptied) folder and used repair.php to fix up the links. I had exported the old SQL database and made a new one on the new host and imported the old backup.

As for upgrading to 2.1 I'll probably have to someday as I might want to run another copy of SMF and my new host only allows one version of PHP running for all domains.

In the meantime turns out I'm on 2.0.15 so question is why can't I run a newer PHP? I'll try PHP 7, that should work right?
EDIT> Seems to be working now with PHP 7.4 - Is it correct that PHP 8 was the problem? OTOH the "Like" mod is broken :(
EDIT>Fixed the one glitch that was preventing me upgrading to 2.0.16 and now I'm all the way up to 2.0.19 :) .  "Like" mod still broken :(
Title: Re: Importing data from V1
Post by: Kindred on June 07, 2024, 06:33:55 PM
2.1.x has likes built in. No mod needed
Title: Re: Importing data from V1
Post by: RoadRanger on June 07, 2024, 07:06:01 PM
I did find a newer version of the "like" mod that works. I'm reluctant to upgrade to 2.1 as I'll lose the past "likes" and a couple other minor customizations I have. This is basically a legacy archive now anyways.

I'll eventually install 2.1 if I need a new forum - looks like that will run fine on the same PHP 7 version :) .

Thanks for your help!
Ron
Title: Re: Importing data from V1
Post by: Kindred on June 07, 2024, 08:05:08 PM
Php 7 is already at end of life...
Title: Re: Importing data from V1
Post by: Melonking on June 18, 2024, 07:23:33 PM
Quote from: Kindred on June 07, 2024, 08:05:08 PMPhp 7 is already at end of life...
This doesn't really address the archive issue; he wants to keep the v1/v2 version up in its original context and that's totally worthwhile. For the most part PHP 7 is fine and will continue to be fine indefinitely, its not perfect but for smaller projects its really not a huge issue.

@RoadRanger the best thing you can do is ensure that your v1 forum is as secure as possible - try not to allow unnecessary user inputs, and maybe make registration approval only - that'll go a long way to avoiding any issue.

In the long term you can look at converting it into a static read only archive that does not depend on PHP - Iv not looked into that but it should be possible and it'll ensure the forum can be read, along with likes and the correct visual structure for decades into the future.
Title: Re: Importing data from V1
Post by: Kindred on June 18, 2024, 07:46:12 PM
Quote from: Melonking on June 18, 2024, 07:23:33 PM
Quote from: Kindred on June 07, 2024, 08:05:08 PMPhp 7 is already at end of life...
This doesn't really address the archive issue; he wants to keep the v1/v2 version up in its original context and that's totally worthwhile. For the most part PHP 7 is fine and will continue to be fine indefinitely, its not perfect but for smaller projects its really not a huge issue.

that is completely wrong.
php7 is at end of life. It is not getting support patches. It is NOT "fine indefinitely"

even for an archive site -- the OP already had to upgrade because the stuff they were using was past EoL -- and by using 2.0.x and php7, they are just setting themselves up for the NEXT forced upgrade.   So, "leave it alone and hope" is not forward thinking.
Title: Re: Importing data from V1
Post by: Arantor on June 19, 2024, 12:54:58 PM
PHP 5 and PHP 7 both have security vulnerabilities that will not be addressed, as does SMF 1.1. That's what end of life means.

Leaving it around is a security risk, simple as that.
Title: Re: Importing data from V1
Post by: Sir Osis of Liver on June 19, 2024, 01:03:02 PM
FWIW, some hosts are using third party support for eol php versions.  From Crocweb support -

The older PHP versions are patched and secured by CloudLinux.

They have php 5.3 - 8.3 available on their servers.  How reliable is this support?  You pays your nickel, you takes your choice.
Title: Re: Importing data from V1
Post by: Arantor on June 19, 2024, 01:08:53 PM
Well, Cloudlinux is based on CentOS which is based on Red Hat so there's a fair chance it will have patches for most things. But that doesn't mean it will have patches for everything because bits of PHP get rewritten entirely at times and sometimes what's left has bugs no-one knows about.

As a general rule it's better to keep current because you don't know how well you can trust your host - and most hosts just don't allow older versions any more.
Title: Re: Importing data from V1
Post by: Melonking on June 23, 2024, 11:43:06 AM
End of Life on a software package doesn't mean anything other than its not getting updates anymore. Its not going to spontaneously stop working (particularly if you not using a managed hosting service). It will continue to function as intended indefinitely.

Will new exploits be discovered? Yes.
Are those exploits going to instantly doom your forum? No.

In most cases they will not apply, be very niche, or your forum will be too small for it to be a worthwhile target. Every site has security risks no matter what software it runs. What matters is the practically of how large those risks are, and how you are going to mitigate them. Using a newer version of a given piece of software is one form of mitigation, however it is by no means the only form, and in some cases its not the best solution.
Title: Re: Importing data from V1
Post by: Arantor on June 23, 2024, 11:54:09 AM
That's just it, though.

There are exploits that get discovered in, say, PHP 8 that *will apply to PHP 7*. Reverse engineering patches is one of the methods that gets used to build attacks.

And if you're connecting it to the internet, attacks have a nasty habit of just launching everything in their toolkit to see what sticks - the thousands of attack attempts I see each month targeting WordPress on sites that have never, ever had WP installed alone demonstrates the applicability of this method.

There's no such thing as 'too small to be a worthwhile target' when the opportunity cost of doing so is so low.

Worse, while you might be prepared to take that risk because you feel you understand it, you're still encouraging others to take a risk they don't understand.
Title: Re: Importing data from V1
Post by: Kindred on June 23, 2024, 06:38:31 PM
Exactly what arantor said.

Also,  security through obscurity does not exist.