Upgrading old forum from SMF 1.1 to current version - Help please

Started by nwflyboy, April 19, 2019, 02:18:52 PM

Previous topic - Next topic

nwflyboy

I have (or rather I should say I had) a forum running for years on SMF 1.1 (RC2).  Yes, I know that's old, deprecated, not secure, etc.  Mea Culpa.
Last weekend, my hosting service finally pulled the plug on PHP5 (which it had been using) and now requires PHP7-compatibility.  Not surprisingly, my forum stopped running.
So now I'd like to (and have to) move to the current release of SMF.

My forum is currently offline but (AFAIK) "intact" though obviously not functioning (I've downloaded all of it so components are preserved locally).

Ideally, I'd like to get the existing forum updated to current bits, while preserving all user content (existing user accounts and their posts).

I had customized my forum with TP (TinyPortal) and a custom theme, modified with some minor cosmetic flourishes.  I'm less concerned right now with preserving all those customizations (it would be nice to save all that but I realize that's probably not realistic - at least not initially; what's important is the content, I can always tweak cosmetics later).  Mostly what I want to focus on is getting the new software installed and running without paving over the existing databases containing user accounts and user posts.

I recognize that such an update has the potential to be at least somewhat labor-intensive and time-consuming (especially for me, since I have not had my fingers in this stuff for a long time), and has some risks of over-writing things I want to preserve.
My goal is to preserve all the legacy user content to the greatest degree possible (at the expense of the increased work and hassle required to ensure that).  At least that's my hope.

I'm not sure where to begin.  Can someone offer a pointer and any additional guidance?  I'll undoubtedly have a bunch of dumb follow-up questions as I go through the process.

Many thanks to all for your assistance and patience.

Arantor

Well, the guide to upgrading is... Upgrading SMF

But the short version is: take a backup, upload the upgrade files over the top of the existing ones, browse to it to perform the upgrade in place. 2.0.15 supports PHP 7.

nwflyboy

Thank you for the pointer.

Given the current state of my forum (currently non-functional due to the old version of PHP5 not running, so my backup is simply downloaded via FTP), the significant delta between the currently-installed version of SMF and the latest, and the customizations in place...

  • Which new version of SMF would you suggest as an appropriate (low-risk) target for the upgrade?
  • Would it be reasonable to expect the standard upgrade path to work (more or less) without significant additional work?
  • Any additional concerns or potential pitfalls I should watch out for before taking the plunge (other than items mentioned in the linked documentation on upgrading)?
Thanks again.

Arantor

The only really viable path at this point is 2.0.15. (2.1 is not yet officially completed.)

The upgrade path should in theory work directly from any 1.1.x version because all code customisations will be replaced by a completely fresh set of files.

nwflyboy

OK, so 2.0.15 it shall be.

I was wondering if it might be prudent to do a "test" upgrade on a copy of the primary forum...essentially, copy everything to a second location (I'll refer to that as a "stage" site), then run the upgrade on the stage site, observe the results, tweak as needed.  This would provide the benefit of being non-destructive, low-risk, and would keep users from messing with it while it's still in progress/being tweaked and evaluated...and it would also give me a chance to re-learn how to make everything work (it's been a while since I set it up), until I'm satisfied with the results and ready to 'cut the ribbon'; if all goes well with the staged copy, then I can run the upgrade on the original/primary site which would then be available to users.  Basically, a chance to "practice" in a no-risk environment.

Is that a reasonable approach, or am I just needlessly complicating things?  I place a high value on preserving the user accounts, user content and forum structure intact...

Thanks again.

Arantor

Ideally, yes, but you need to reset the various paths and so on first to live in the new place before you do that staging upgrade.

Are you needlessly complicating things? Not really; when I do the same job on much larger sites (and by larger, I mean, business critical sites with hundreds of thousands of users and a codebase 10x larger than SMF), that's exactly what I do. Sometimes even multiple levels of staging site.

The problem is that SMF kind of requires stuff to be set up - so copy the files to the staging area, upload the new files but before you try to run the upgrade, try using the repair_settings.php tool to fix the paths; I've never tried it in your specific situation so I'm not 100% sure it would work, but failing that changing the paths in Settings.php and in the database in the smf_themes table to point to the new locations would work. (There will be other paths, smileys, attachments and so on but for an initial kicking the tyres, that's not needed)

Sir Osis of Liver

You will not be able to upgrade directly from 1.1 RC2 () to 2.0.15, and you will not be able to upgrade at all in php 7.  You'll have to downgrade php to 5.4 max, upgrade to 1.1 final, then you may be able to upgrade to 1.1.21 in one jump, then upgrade php to 5.6 and upgrade 1.1.21 to 2.0.15.  Good luck (you'll need it :P).

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

nwflyboy

Well it seems there may be a difference of opinion?

Quote from: Arantor on April 19, 2019, 03:20:58 PM
The upgrade path should in theory work directly from any 1.1.x version because all code customisations will be replaced by a completely fresh set of files.

Quote from: Sir Osis of Liver on April 19, 2019, 09:50:54 PM
You will not be able to upgrade directly from 1.1 RC2 to 2.0.15, and you will not be able to upgrade at all in php 7.  You'll have to downgrade php to 5.4 max, upgrade to 1.1 final, then you may be able to upgrade to 1.1.21 in one jump, then upgrade php to 5.6 and upgrade 1.1.21 to 2.0.15.  Good luck (you'll need it).

Well that's certainly discouraging.

My hosting service says PHP5 has been completely removed from my server. 

Sir Osis of Liver

I've upgraded several early 1.1.x forums by importing database to clean install on my server, did upgrade there, then moved it back to production forum.  Is the forum currently up and running?  Link?  If you can pm cpanel access, I'll have a look.  As long as the database is not damaged, should be doable.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Doug Heffernan

Quote from: nwflyboy on April 19, 2019, 10:42:15 PM
Well it seems there may be a difference of opinion?

Quote from: Arantor on April 19, 2019, 03:20:58 PM
The upgrade path should in theory work directly from any 1.1.x version because all code customisations will be replaced by a completely fresh set of files.

Quote from: Sir Osis of Liver on April 19, 2019, 09:50:54 PM
You will not be able to upgrade directly from 1.1 RC2 to 2.0.15, and you will not be able to upgrade at all in php 7.  You'll have to downgrade php to 5.4 max, upgrade to 1.1 final, then you may be able to upgrade to 1.1.21 in one jump, then upgrade php to 5.6 and upgrade 1.1.21 to 2.0.15.  Good luck (you'll need it).

Well that's certainly discouraging.

My hosting service says PHP5 has been completely removed from my server.

I would follow Arantor 's advice if I were you. He knows what he is talking about.

Gary

The upgrader is designed to upgrade from any version since YaBB SE 1.5.5 including 1.1 RC2. This is why there are multiple SQL files.

Anyway, if your host doesn't support PHP 5 then you can always make use of a localhost on your PC and then do the upgrade on that instead. Especially since you plan on running a test upgrade anyways.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Sir Osis of Liver

Quote from: doug_ips on April 20, 2019, 07:52:46 AM
I would follow Arantor 's advice if I were you. He knows what he is talking about.

Thanks, doug. :P


Quote from: Gazmanafc on April 20, 2019, 09:28:33 AM
The upgrader is designed to upgrade from any version since YaBB SE 1.5.5 including 1.1 RC2.

If everything worked like it's supposed to (it doesn't), the world would be a much better place (it isn't).  I've probably upgraded more forums than most people here (yes, even Arantor), and have run into several situations where upgrades could not run correctly on some host servers, even for short upgrades.  More importantly in this case, the upgrade scripts are fussy about php version.  On most servers you cannot run upgrades from early 1.1 in anything later than php 5.4, it just won't work.  Wouldn't expect that the devs ever anticipated anyone attempting an upgrade from a 1.1 RC directly to 2.0 (would you?), the upgrade scripts won't handle it, even on my server, which is very SMF friendly.

If either of you geniuses think you can do it, you're certainly welcome to try.

@nwflyboy - My offer to assist you still stands.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Considering that I've upgraded from 1.1 RC2 to 2.0 versions, yes, I would expect that to work correctly. But sure, you know better than someone who used to do literally SMF dev full time.

nwflyboy

First of all, many thanks to all who have already offered advice, insights and suggestions; all is appreciated, and I am sure I will rely on more from you going forward, so thanks in advance for your continued assistance.

Although I do most of my work on a Mac, I do have a Windows PC handy right next to me, so if I need to run PHP on that, it is an option (PC is a perfectly capable one, running Windows 10 and is up to date); I suspect I will need a bit of basic guidance if I'm going to install and run PHP on it (AFAIK my PC doesn't have any version of PHP on it currently, it's a fairly clean machine.  We'll cross that bridge if/when we get to it.

Before proceeding, a housekeeping question: should this thread be here under the "SMF 2.0.x Support" forum, or would it be more appropriate to move it to another forum (eg SMF 1.1.x Support)?

Thanks again.

Edited to add: Yes, I am aware that there may be a delta between how we hope things will work, and how stuff happens out in the real world.  I tend to keep plenty of backup copies of stuff to serve as a safety net for that (and for Stupid User errors).

GigaWatt

Quote from: nwflyboy on April 20, 2019, 07:36:12 PM
Before proceeding, a housekeeping question: should this thread be here under the "SMF 2.0.x Support" forum, or would it be more appropriate to move it to another forum (eg SMF 1.1.x Support)?

Hmmm... this is an interesting question actually.

But, since you're looking for advice about upgrading from 1.1 to 2.0, I think the 1.1 support board is a better place for this thread, so I'll just transfer it there ;). You'll probably have more questions about how to do this or that once you upgrade, so you'll probably open a few topics in the 2.0 support board, don't worry :P :D.

If anyone from the staff doesn't agree with this decision, they can move the topic back to the 2.0 support board ;).

Quote from: nwflyboy on April 20, 2019, 07:36:12 PM
Although I do most of my work on a Mac, I do have a Windows PC handy right next to me, so if I need to run PHP on that, it is an option (PC is a perfectly capable one, running Windows 10 and is up to date); I suspect I will need a bit of basic guidance if I'm going to install and run PHP on it (AFAIK my PC doesn't have any version of PHP on it currently, it's a fairly clean machine.  We'll cross that bridge if/when we get to it.

You have to install something like this on your PC.

https://www.softpedia.com/get/Internet/Servers/Server-Tools/XAMPP.shtml

https://www.softpedia.com/get/PORTABLE-SOFTWARE/Internet/Servers/Portable-XAMPP.shtml

https://www.softpedia.com/get/Internet/Servers/Database-Utils/WAMP5.shtml
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Sir Osis of Liver

Quote from: Arantor on April 20, 2019, 07:26:26 PM
Considering that I've upgraded from 1.1 RC2 to 2.0 versions, yes, I would expect that to work correctly. But sure, you know better than someone who used to do literally SMF dev full time.

I know who you are, Arantor, and where you come from, I'm not impugning (sp?) your expertise.  It may be possible to upgrade directly from early 1.1 directly to 2.0 on some servers, but it's never worked on any forum I've tried it on.  Granted most of the forums I work on are already damaged when I get to them.  But the upgrade scripts are fussy about php version, and if you don't have the right combination of upgrader and php, it won't work.  That's been my experience, anyway.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

nwflyboy

OK, a couple questions to enable me to get started...

1. Can anyone recommend a good FTP client for Windows 10?  Reliable, simple, easy to use, with GUI (rather than command line UI), free or cheap preferred.  I'm sure there are plenty to pick from, but I'm mostly used to Mac FTP clients and haven't used one on a PC for a long time.  Any you like/recommend?

2. I see in a prior post pointers to multiple variants of PHP5.  Can anyone suggest one over another? (Note: if I end up using that on my local PC, I'll be asking questions about it...so my preference is for a version that's simple to use, and familiar to those who would be willing to answer questions about it here  ::)).

Thanks.


Yellowrose

Filezilla is also easy to use your PC folders open on the left side windows your server folders can be opened from the right side windows and it's simple drag and drop from left window to right. I am by no means an expert but I have used this program for years. Up at the top where is say host name for your login when connecting to the live server rather then using the normal say [email protected] just use an ip address connections seem to last longer that way.

Gary

Quote from: Sir Osis of Liver on April 20, 2019, 04:37:25 PM
Wouldn't expect that the devs ever anticipated anyone attempting an upgrade from a 1.1 RC directly to 2.0 (would you?), the upgrade scripts won't handle it, even on my server, which is very SMF friendly.
The upgrader is designed and is capable of upgrading from every version that has existed since YaBB SE 1.5.5, and I've upgraded to 2.0 from YaBB SE 1.5.5 in fact, successfully. That's extremely rare but a 1.1 upgrade isn't as rare as that. So yes, the dev's can expect 1.1 RC versions to upgrade to 2.0, and even 2.1, simply because that's how the upgrader functions and yes, as a team member myself, I do too.

Using YaBB SE 1.5.5 as an example, the upgrader will upgrade that to 1.0, and in turn that'll upgrade to 1.1, and then 2.0 and finally 2.1 in sequence, though you probably knew that.

I'm not denying that server environment plays a part, but that's why people should backup and test an upgrade first. I've always found using a localhost to get around a live-server failed upgrade has resulted in success regardless of version being upgraded from.

But I believe it's wrong to suggest that upgrading between major versions in that fashion is an absolute requirement, when actually it's not. Suggest it as an option should a straight upgrade fail by all means. Experiences can differ, but please at least suggest the designed method first.

Quote from: nwflyboy on April 20, 2019, 07:36:12 PM
Although I do most of my work on a Mac, I do have a Windows PC handy right next to me, so if I need to run PHP on that, it is an option (PC is a perfectly capable one, running Windows 10 and is up to date); I suspect I will need a bit of basic guidance if I'm going to install and run PHP on it (AFAIK my PC doesn't have any version of PHP on it currently, it's a fairly clean machine.  We'll cross that bridge if/when we get to it.
You can install a localhost on your Mac if you so desire, there exist application packages that'll allow you to install a localhost very easily, such as XAMPP and is available for Mac with little configuration. (When I said PC, I  didn't actually mean Windows. Just whatever computer you like to use regardless of OS ;))
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Doug Heffernan

Quote from: Sir Osis of Liver on April 20, 2019, 04:37:25 PM

I've probably upgraded more forums than most people here (yes, even Arantor)

I seriously doubt it. But let us say for the sake of argument that you have, quantity does not mean quality. Just saying... .


GigaWatt

My only advice to nwflyboy regarding any FTP client would be don't forget to set the client to transfer files in binary mode, not ASCII or Auto mode.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

nwflyboy

Just an update (and a couple question) to let you know this is still an active request, and I have been working on getting set up and ready...

I've spent some time in the past few days prepping my Windows PC for the task, including some things I should have done anyway - ie setting up good, solid backups (automated and ongoing), installing an FTP client (I went with FileZilla, which seems like a standard choice) and general housekeeping. It's running Windows 10 64 bit and has all the current OS updates.  I've also downloaded full copies of my forum and databases via FTP (I'm making multiple backups of everything, so just in case anything goes sideways, I should be able to contain any damage and resume with undamaged files).

A couple questions before I proceed....

I am assuming that in order to run the upgrade scripts, a version of PHP5 needs to be present and available on the host where the forum resides.  Correct?

Assuming that's the case, I have been working from the assumption that I will need to install PHP5 locally on my Windows PC, and run the upgrade there.  Reasonable expectation?

Note: as I mentioned above, I'm generally more of a Mac guy, although I have a perfectly capable Windows 10 machine here and can use it (although I probably make dumb Mac guy mistakes at times).  While I understand that I could get a version of PHP5 on my Mac, I'm assuming that you folks who will be assisting me through this process are more fluent and comfortable using such tools on Windows PCs, and I want to make it easier for you to help me.  Also, I don't really have anything on the PC that's mission-critical, so in the event that something Really Bad happens, it wouldn't kill me if I had to just re-pave the PC and start fresh (the Mac has high-value content on it).

So, a question about getting PHP5 installed on my Windows PC: There seem to be multiple sources/variants.  What source/version is recommended in my case?

Another question: I spoke with the support staff at my hosting service about the process I was about to start.  They confirmed that PHP5 has been completely removed from the server I use there.  However, it sounded like there might be other servers there where PHP5 has not yet been completely removed (this is speculation, but that was the impression I got from the way their support guy framed his answer to my question).  If that is the case, it now occurs to me that this process might be simplified somewhat if I were able to have my hosting service (temporarily) copy my forum (and database) over to one of their servers where PHP5 is still available, and try running the upgrade there.  I don't know if they would be willing to do that for me (I only thought of it as an option after I got off he phone with them).  But if they were willing to do so, would that simplify the upgrade path - or would it just complicate it further?

Thanks again for the help and for your patience.

GigaWatt

Quote from: nwflyboy on April 26, 2019, 02:31:31 PM
... installing an FTP client (I went with FileZilla, which seems like a standard choice)...

Quote from: GigaWatt on April 21, 2019, 05:27:55 PM
My only advice to nwflyboy regarding any FTP client would be don't forget to set the client to transfer files in binary mode, not ASCII or Auto mode.

Quote from: nwflyboy on April 26, 2019, 02:31:31 PM
... (I'm making multiple backups of everything, so just in case anything goes sideways, I should be able to contain any damage and resume with undamaged files).

Always a good precaution measure ;).

Quote from: nwflyboy on April 26, 2019, 02:31:31 PM
I am assuming that in order to run the upgrade scripts, a version of PHP5 needs to be present and available on the host where the forum resides.  Correct?

Yes. With 1.1 you should start with 5.4 and go up from there. I'd advise you to upgrade to 2.0.10 first (large upgrade pack), then up the PHP version to 5.6, then upgrade to 2.0.15 (large upgrade pack), then up the PHP version again to 7.1 ;).

Quote from: nwflyboy on April 26, 2019, 02:31:31 PM
Assuming that's the case, I have been working from the assumption that I will need to install PHP5 locally on my Windows PC, and run the upgrade there.  Reasonable expectation?

Yes ;).

Quote from: nwflyboy on April 26, 2019, 02:31:31 PM
Note: as I mentioned above, I'm generally more of a Mac guy, although I have a perfectly capable Windows 10 machine here and can use it (although I probably make dumb Mac guy mistakes at times).  While I understand that I could get a version of PHP5 on my Mac, I'm assuming that you folks who will be assisting me through this process are more fluent and comfortable using such tools on Windows PCs, and I want to make it easier for you to help me.  Also, I don't really have anything on the PC that's mission-critical, so in the event that something Really Bad happens, it wouldn't kill me if I had to just re-pave the PC and start fresh (the Mac has high-value content on it).

There are people here using Macs, but they're probably not the majority. Most of us use either Windows or Linux.

This is just some info gathered from here and there, can't really say this as a fact, but yes, I believe most of us are more "fluent" in either Windows or Linux ;).

I'd advice you to create a restore point on the Windows PC before you continue installing stuff on it ;).

Quote from: nwflyboy on April 26, 2019, 02:31:31 PM
So, a question about getting PHP5 installed on my Windows PC: There seem to be multiple sources/variants.  What source/version is recommended in my case?

I'd say either XAMPP or WAMP.

Quote from: GigaWatt on April 20, 2019, 10:31:59 PM
You have to install something like this on your PC.

https://www.softpedia.com/get/Internet/Servers/Server-Tools/XAMPP.shtml

https://www.softpedia.com/get/PORTABLE-SOFTWARE/Internet/Servers/Portable-XAMPP.shtml

https://www.softpedia.com/get/Internet/Servers/Database-Utils/WAMP5.shtml

Quote from: nwflyboy on April 26, 2019, 02:31:31 PM
Another question: I spoke with the support staff at my hosting service about the process I was about to start.  They confirmed that PHP5 has been completely removed from the server I use there.  However, it sounded like there might be other servers there where PHP5 has not yet been completely removed (this is speculation, but that was the impression I got from the way their support guy framed his answer to my question).  If that is the case, it now occurs to me that this process might be simplified somewhat if I were able to have my hosting service (temporarily) copy my forum (and database) over to one of their servers where PHP5 is still available, and try running the upgrade there.  I don't know if they would be willing to do that for me (I only thought of it as an option after I got off he phone with them).  But if they were willing to do so, would that simplify the upgrade path - or would it just complicate it further?

I was inclined to suggest something like this (I might've even suggested it, can't really remember), but you went the "I'll do it on my own PC" way, so I just backed off :P.

If it was me, I'd do it this way. Either this way or create a temporary account on a free hosting provider, do the upgrade there and delete everything afterwards ;). Of course, once you upload the data on the free host, you really can't be sure what the host will do with it in the future, but if the forum's data is not really "hush hush", I'd probably be more comfortable doing it this way ;). Besides, you'll probably learn a thing or two about managing your forum from your host's control panel, since your local PC and your host's control panel are two entirely different things.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

nwflyboy

OK, moving this forward again...

My Windows PC has been prepped and I have some time this week scheduled to take a run at this.  I am now attempting to get an appropriate version of PHP5 downloaded and installed to my PC.  And, surprise, I've got a question already...

It's suggested above that I should initiate this with PHP5.4
OK, so I'm looking for that - PHP 5.4.  Following the links above (the first one: https://www.softpedia.com/get/Internet/Servers/Server-Tools/XAMPP.shtml) lands me on a XAMPP download page, that looks like this:



The advice above is "With 1.1 you should start with 5.4 and go up from there."  I take it that means the suggestion is to install PHP version 5.4.x (that is, version 5.4 and any version number more specific than that (the trailing x in 5.4.x) doesn't matter.

The default download on that landing page looks like version 7.x so I assume I need to find a legacy version.  Clicking on the "Download" tab on that page brings up additional versions/options, like so:



I take it that what I need is to grab the highlighted option (or another below it) for PHP 5.4.31.  Is that correct?

Note that my PC is running Windows 10...is that going to be OK with this older version?

Once I get this installed, I'll surely have more questions.  Thanks in advance for your continued assistance and your patience with my small steps.

Sir Osis of Liver

No offense, but I don't understand why you're going to all this trouble to do a simple upgrade.  Your forum has been offline for a month, and you're knocking your brains out apparently trying to set up a local server just to do the upgrade.  You should have had your forum upgraded and back online a day or two after your original post, unless you're just doing this as a busywork project.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: