News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

error during upgrade from 1.1.21 to 2.0.15

Started by LPChip, October 28, 2018, 02:56:47 PM

Previous topic - Next topic

LPChip

I have 2 old 1.1.21 installs for 2 different communities.

My server runs php 5.6 and due to the life expectency of php 5.6 vs php 7, I need to upgrade to 2.0.15 at some point. In order to do so I am attempting to upgrade SMF. I have done it succesfully on my other install, but the current one is not working.

I keep getting the following error: The upgrader found some old or outdated language files, for the forum default language, english.

I have no idea how to fix it. I uploaded all files from the upgrade package and replaced all files, that didn't work.
I have removed all themes (dir was empty) then reuploaded the themes folder from the upgrader package, that didn't work either.
I tried the repair_settings.php file, which only really commented on a missing database scheme for MySQL, but the page does not have a save button so I can't make any changes that way either.

How can I upgrade my old forum to 2.0.15? Is it by any means possible to upgrade manually, or stuff I can try prior to uploading the upgrade package? (I have the old forum still working, and making the upgrade in a separate (working in 1.1.21) install, so I can try as many times as I need.

Any help is really appreciated.

Also, The difference between the 2 forums are that the problem one has both Dutch and English language packs installed, where the other one hasn't.

The other forum that does upgrade has lots of mods installed where this one has only a few. I'm pretty sure the mods are not the problem.

Sir Osis of Liver

No, mods are not the problem.  Try uninstallimg the language packs, upgrade, then reinstall.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

LPChip

Quote from: Sir Osis of Liver on October 28, 2018, 05:50:50 PM
No, mods are not the problem.  Try uninstallimg the language packs, upgrade, then reinstall.

Hi there,

Thanks for your reply. I don't seem to be able to uninstall language packs. They're not listed as mods/add-ons. Can you tell me how I can remove them either manually or by linking to a page that describes which files I need to remove?

Sir Osis of Liver

Hmm, actually there isn't any way to uninstall a language other than manually deleting the files from /Themes/default/languages/.  You should be able to identify them by filename.  You might try uploading a clean set of language files from 1.1.21 upgrade package.

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

                                     - R. Waters

LPChip

I tried that, but that didn't work. But I have some old themes installed too, so I now removed all themes but the default and core and then see if that will work, optionally deleting those themes and upload the folders from the upgrade package to replace them.

Will keep you posted.

Sir Osis of Liver

If you've uploaded the 2.0.15 upgrade package, run upgrade.php, and get language file error, that's got nothing to do with your 1.1.21 english files, as they've been replaced with 2.0 files.  If you've removed all language files except default english, then you're getting an incorrect error.  Are you upgrading in php 5.6?  I've seen this before, but don't remember how I worked around it.  Just a guess, but try upgrading in php 5.4.

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

                                     - R. Waters

LPChip

Quote from: Sir Osis of Liver on October 29, 2018, 12:42:10 PM
If you've uploaded the 2.0.15 upgrade package, run upgrade.php, and get language file error, that's got nothing to do with your 1.1.21 english files, as they've been replaced with 2.0 files.  If you've removed all language files except default english, then you're getting an incorrect error.  Are you upgrading in php 5.6?  I've seen this before, but don't remember how I worked around it.  Just a guess, but try upgrading in php 5.4.

Yes, I'm upgrading in 5.6, its the lowest php version my provider gives me. Going in a lower version doesn't work, but I have another install that does allow me to upgrade. Given that I actually only need the database to be converted, I can try to copy over those files instead and see if I can then upgrade. hmm, that's an interesting idea. :)

Illori

check in your Settings.php what value is listed for $language =

LPChip

Quote from: Illori on October 29, 2018, 12:52:10 PM
check in your Settings.php what value is listed for $language =


$language = 'english'; # The default language file set for the forum.

Illori

are the English language files located in /themes/default/languages? if you open up index.english.php does it say it is for a 2.0.* version?

LPChip

I think I got it now.

Before I uploaded the upgrade files, I removed all themes from the admin section, then removed all theme folders that remained that aren't default.

Made sure the forum still worked, and it did. Then removed everything that had the word .dutch.php in it in the language folder inside the default theme, refreshed page, forum went to english, then went to admin, pressed save on the board default (This was done before my previous answer)

Then uploaded the upload package once more, and now I actually get a normal themed upgrade site without error. I think I fixed it.

LPChip

Yup, that did it. Thanks everyone for the help. :)

LPChip

Okay, so I got an install updated to 2.0.15 so I can work on a template for the site, and got it almost done.

So today I decided to prepare for the upgrade by doing the exact same process as above once more, but instead of running the upgrade.php I just keep it at that stage, so at any point I can just import the latest version of the database, upgrade it to 2.0.15 then copy over the files from the development 2.0.15 install.

To my surprise, I hit the exact same barrier as above. I had copied all files from just before the upgrade and I was sure I could just upload those files and have it working, but instead it didn't.

And I didn't understand why. It kept complaining about bad language files once more. So I decided to do the steps once more as described above and that eventually lead me to find the real cause of this language problem.

The real reason is this: When you export your database of a current install, and then import it to another install (folder is at a different place) you also have to actually change a few paths that are somewhere in the database. These are specifically paths for the themes and they are NOT the paths from settings.php.

It is as simple as just going to the admin page, themes, and press the button to attempt to fix the paths, given that the path in your settings.php is actually correct.

Of course, you do have to make sure that the language files are actually up-to-date, but that should now be the case because you copied them over from the upgrade package.

So to perform an upgrade at a different location than your production forum is resided, these are the steps you should need to take:

1. Create the place where the upgrade is going to take place.
2. Copy all files to that location (FTP -> Download all from source, upload to new location)
3. Export the database
4. Create new database that you will use for the upgrade.
5. Import the database to that new database
6. Update settings.php and edit the database information as well as the correct paths.
7. Go to your forum.
8. Go to the admin section and check every place that has paths, should be the server settings which is your settings.php file, and the section for themes.
9. Once they are correct, upload the upgrade package and overwrite all files
10. Visit the upgrade.php page and perform the upgrade.

Sir Osis of Liver

Well, yes, you can either upgrade then move, or move then upgrade, but if you do the latter, you must fix settings before you do anything.  I prefer to upgrade first, make sure it's running ok, then move.  As I mentioned earlier, upgrader will sometimes report an incorrect error, especially if you've done something to confuse it (like running it with incorrect settings).
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

LPChip

I don't actually move then upgrade, I copy, then upgrade, then switch.

I don't want the upgrade process to be at the place where people go naturally to not confuse them. Instead when I make the final switch, I put the forum in maintenance mode, giving an explanation, export the database a last time, perform the upgrade at another site, then switch to the new location.

This way, people don't get a weird error, but instead what I want them to see in a user friendly environment.

Kindred

but you can't do it that way...

either
1- upgrade in place
2- confirm that upgrade worked
3- move
4- reconfigure settings to new location
5- confirm that site works in new location

or
1- move
2- reconfigure settings to new location
3- confirm that site works in new location
4- upgrade
5- confirm that upgrade worked

these are the only two paths that will allow you to correctly move and upgrade.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

LPChip

Yes, the 2nd method was what I was attempting. The problem is that the site in the old setting works correctly because the path is set to the old location even though the new location has the same files. So the forum works correctly, but the upgrade failed and I didn't understand why. I thought that the settings.php file was the only place paths were stored. Now I know better.

My current plan is to make a db export of the settings in the database in the new location, then when the time comes, I export the old forum database and import it into the new location for the upgrade, then import the settings for the new location I exported earlier to correct the upgrade process, then start the upgrade process.

My goal is to be able to develop the new version as much as I need without having the old version offline, then when I do upgrade, keep the downtime to a minimum without getting to a state where the user would see an error message. And the procedure I am using makes that possible.

I have shell access which I used to remove the initial folder for my domain and used a symlink to point it to another folder which holds the old forum. By a single command in the shell terminal, I can flip it to the new site instantly, which means that for the user it is seamless.

The old forum is located now at /sties/old.domain.ext

In terminal I set the redirection up as follows:

mv public_html public_html2 && ln -s sites/old.domain.ext public_html


So the public_html folder that normally houses my forum redirects to the new location.

If necessary I can use one command now to flip the switch and change the redirection to the new forum software.

From the back of my head, the switch command is:

rd public_html && ln -s sites/domain.ext public_html


The rd command works here because it is already a symlink. I can actually keep the files in the public_html folder and use the first command to switch to the new file directly, but I did it this way to make sure this redirect thingy actually worked.

Sir Osis of Liver

You're really overcomplicating a fairly simple process.  Unless you have a huge database, the entire upgrade process shouldn't take more than 15-20 minutes.  Put your forum in maint mode, dump the db for backup, run the upgrade in place.  Worst case, if upgrade fails, just import backup.  You can create a situation where muddled paths are causing forum to load files from different installs (even different servers), which makes for a confusing mess.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

LPChip

Thanks for your concern. I know what I'm doing, and I have good reasons to keep the downtime to my users as little as possible and also making the transition as error free as possible.

I am indeed making things very complex, but again, I have my reasons for requiring this.

But the moral of the story is not my complex setup, but the fact that the upgrade failed because there is a path in the database that I was unaware of.

GigaWatt

Quote from: LPChip on October 31, 2018, 12:18:05 PM
But the moral of the story is not my complex setup, but the fact that the upgrade failed because there is a path in the database that I was unaware of.

You fix those issues with repair_settings.php, then run the upgrade.

Quote from: LPChip on October 28, 2018, 02:56:47 PM
I tried the repair_settings.php file, which only really commented on a missing database scheme for MySQL, but the page does not have a save button so I can't make any changes that way either.

Can't make a screen shot right now because I don't have a working 2.0 or 1.1 install, but there is a save button, but it's not actually called save, it was a few words... maybe save was one of them, but it wasn't just save.
"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?"..."

Advertisement: