error "current version 2.1.2 but upgrade script is for 2.1.2"?

Started by Cheri, May 11, 2022, 09:13:51 PM

Previous topic - Next topic

Cheri

<I>I only use SMF. I have had no reason to do anything with the database. It's a small forum that I use as a members area for my Board and committees.

Am I missing something?


Doug Heffernan

Quote from: Cheri on May 14, 2022, 12:25:21 PM<I>I only use SMF. I have had no reason to do anything with the database. It's a small forum that I use as a members area for my Board and committees.

Am I missing something?



The database is the most important thing. Without it there is no forum. Who is your host? Most host come with a cPanel or Plesk, which are two of the most popular hosting control panels.

How did you install your forum in the first place? Where did you created the database, the user and password that were assigned to it? Or did someone else set it up for you?

Cheri

<I>ahhh.. I just didnt know what you were talking about.. its cPanel! I set it up, but if memory serves A2 had to change some permission settings.. they suggest using Softaculous to upgrade to 2.1.2 but it didnt work and advice here is that is a baddd idea, so Im hoping for help to just upgrade without trying the Softaculous again (it failed twice)

Tyrsson

Quote from: Cheri on May 14, 2022, 03:14:58 PMits cPanel!
Then in Cpanel. If you scroll down and look under - Databases - You will see a listing for PhpMyAdmin. Click that and it will redirect you to phpmyadmin for your account. Which is where you will be able to run the query @Doug Heffernan Detailed above. It will also allow you to export a backup of your current database. This is what contains ALL of your post, members etc. Files are easy to replace, Databases, once lost or corrupted, can be difficult to impossible to recover. Take backups regularly. I would suggest once a week depending on how active your site is.

To provide you some much needed info. Your site basically uses two different servers. A web server, most likely Apache and MySQL. Apache and php serves the files, apache accesses the files stored on the server and "parses" or executes the php within the files. Apache, also, via php interacts, reads and writes, to and from the MySQL database. Which is where all of your dynamic, eg your interactive, data is stored.

PhpMyAdmin is a database administration application written in php to allow a user to interact and manage the MySQL server using a GUI or graphical user interface. Which is easier than using a terminal session (command line).

The reason your host suggest that you use the softaculous or "craptaculous" script to upgrade, honestly, and I can say this because I am not on the team currently. Frankly, either A) they do not know any better, or B) they cant be bothered with support tickets for anything other than what they absolutely have to answer.

However, with that said. For anyone running a site. Its absolutely necessary to learn at least the basics of how the web works, and the components of the hosting environment so that they can effectively communicate with the various support personnel they will need during the lifetime of their sites. Most, like you, start learning when its required because something didnt work as expected or blew up. That's ok, just understand, the team here is trying to guide you in a way that will do two things. A) Get your site back online as fast as possible B) Teach you how to not get caught in this situation again, which, is the best possible outcome :)   
PM at your own risk, some I answer, if they are interesting, some I ignore.

Cheri

#24
oh, I get it. I am not an IT or tech, I am just geeky enough to be dangerous. But, I am teachable!  ;D 

I backed up from SMF itself (and with Softculous before that upgrade attempt) I also kept a copy of the whole directory before I overwrote any of the files.
And now I have a backup from phpMyAdmin too.


The query results..

localhost/      
 Showing rows 0 -  6 (7 total, Query took 0.0008 seconds.)

 Showing rows 0 -  6 (7 total, Query took 0.0004 seconds.)

SELECT value FROM `smf_themes` WHERE variable = 'theme_dir'


SELECT value FROM `smf_themes` WHERE variable = 'theme_url'


value   value   
/home/jcunited/public_html/Themes/default   
/home/jcunited/public_html/Themes/core   
/home/jcunited/public_html/Themes/polaris   
/home/jcunited/public_html/Themes/smf_2-0-17_insta...   
/home/jcunited/public_html/Themes/Wgame   
/home/jcunited/public_html/Themes/Ancient_and_Rust...   
/home/jcunited/member.jcunitedway.org/Themes/desig...   
https://jcunitedway.a2hosted.com/Themes/default [nofollow]   
https://jcunitedway.a2hosted.com/Themes/core [nofollow]   
https://jcunitedway.a2hosted.com/Themes/polaris [nofollow]   
https://jcunitedway.a2hosted.com/Themes/smf_2-0-17 [nofollow]...   
https://jcunitedway.a2hosted.com/Themes/Wgame [nofollow]   
https://jcunitedway.a2hosted.com/Themes/Ancient_an [nofollow]...   
https://member.jcunitedway.org/Themes/designblue2 [nofollow]   



localhost/      
 Showing rows 0 -  6 (7 total, Query took 0.0008 seconds.)

 Showing rows 0 -  6 (7 total, Query took 0.0004 seconds.)

SELECT value FROM `smf_themes` WHERE variable = 'theme_dir'


SELECT value FROM `smf_themes` WHERE variable = 'theme_url'


value   value   
/home/jcunited/public_html/Themes/default   
/home/jcunited/public_html/Themes/core   
/home/jcunited/public_html/Themes/polaris   
/home/jcunited/public_html/Themes/smf_2-0-17_insta...   
/home/jcunited/public_html/Themes/Wgame   
/home/jcunited/public_html/Themes/Ancient_and_Rust...   
/home/jcunited/member.jcunitedway.org/Themes/desig...   
https://jcunitedway.a2hosted.com/Themes/default [nofollow]   
https://jcunitedway.a2hosted.com/Themes/core [nofollow]   
https://jcunitedway.a2hosted.com/Themes/polaris [nofollow]   
https://jcunitedway.a2hosted.com/Themes/smf_2-0-17 [nofollow]...   
https://jcunitedway.a2hosted.com/Themes/Wgame [nofollow]   
https://jcunitedway.a2hosted.com/Themes/Ancient_an [nofollow]...   
https://member.jcunitedway.org/Themes/designblue2 [nofollow]   

Doug Heffernan

#25
Hello @Cheri, I edited your post and removed the links to your phpmyadmin. I think it poses a security risk to post it in the public.

That said, the following do not correspond with the right paths and urls of your forum. Have you run the repair_settings.php tool?

Quote from: Cheri on May 14, 2022, 05:38:16 PMhttps://jcunitedway.a2hosted.com/Themes/default [nofollow]   
https://jcunitedway.a2hosted.com/Themes/core [nofollow]   
https://jcunitedway.a2hosted.com/Themes/polaris [nofollow]   
https://jcunitedway.a2hosted.com/Themes/smf_2-0-17 [nofollow]...   
https://jcunitedway.a2hosted.com/Themes/Wgame [nofollow]   
https://jcunitedway.a2hosted.com/Themes/Ancient_an [nofollow]...   
 



Cheri


Sir Osis of Liver

Quote from: Cheri on May 13, 2022, 01:56:22 PMthe forum's back up on 2.0.19. Everything looks right except the attachments arent working

If attachments aren't being displayed in 2.0.19, it may be because you've restored a backup of /attachments that was made after first 2.1 upgrade attempt.  Upgrader adds .dat extension to hashed filenames, which makes them incompatible with 2.0 database.  You have to remove the extension to get them working again in 2.0.19.  Upgrader also moves uploaded avatars from /attachments to /custom_avatar and changes filenames.  You'd need to replace /attachments with backup made prior to first upgrade attempt.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Doug Heffernan

Quote from: Cheri on May 14, 2022, 06:42:22 PMthanks @Doug Heffernan

I did run repair.. posted screenshots yesterday

Looking at your previous post, your default theme url, and of the other themes that I quoted as well, do not match the url of your forum...

Cheri

@Sir Osis of Liver 
Thank you! this was exactly why the the attachments weren't working, and they restored. (Now, after correcting the themes issues and repair below, some are working and some arent, but I can live with that, I have backups of anything that was attached if we need it)

@Doug Heffernan
I deleted the Themes except the one in use and the default and reset themes and URLs in SMF. Now I think it's correct.
QuoteSELECT value FROM `smf_themes` WHERE variable = 'theme_dir'
SELECT value FROM `smf_themes` WHERE variable = 'theme_url'
value value
/home/jcunited/member.jcunitedway.org/Themes/defau...
/home/jcunited/member.jcunitedway.org/Themes/desig...
https://member.jcunitedway.org/Themes/default [nofollow]
https://member.jcunitedway.org/Themes/designblue2 [nofollow]

@Aleksi "Lex" Kilpinen 

QuoteActually, I took a look at that upgrade - I would highly suggest reverting to the backup for now. If you can be sure the backup is good.
Then please check all your paths and urls using repair_settings.php and make sure your default theme works correctly before proceeding to the update. Currently it looks like your Default theme url does not match your forum URL, and elements of the theme are non-reachable. For example, the simplemachines logo is pointing to https://jcunitedway.a2hosted.com/Themes/default/images/smflogo.svg [nofollow] which gives a 404, since it should apparently be https://member.jcunitedway.org/Themes/default/images/smflogo.svg [nofollow] which works. These can be issues caused by the failed auto-installer upgrade, so simply reverting to the backup may fix things completely, and then starting the proper upgrade should be safe.
Ive reverted to the backup and 2.0.19, and all seems to be working, including attachments. I think the themes are correct now, I ran repair again.. and repaired what would...  These two still say Value not found! Tasks Directory, Packages Directory but both folders are there and have stuff in them.

Im afraid to try the upgrade again yet, because I dont know why those two values wont set with repair.. the only other thing that repair still has in red is the cache section. I havent changed any of that because I dont know what it should be.

Doug Heffernan

#30
Quote from: Cheri on May 15, 2022, 09:27:23 AMIm afraid to try the upgrade again yet, because I dont know why those two values wont set with repair.. the only other thing that repair still has in red is the cache section. I havent changed any of that because I dont know what it should be.

You can click the link that it is receommended the repair_settings.php tool for those areas where it says: Value not found.

Regarding the upgrade, you do not have to be afraid. As long as you make a backup of the database beforehand everything will be alright.


Cheri

@Doug Heffernan 
That's what I did and I just tried it again and it still does not change those two.. the tasks and Packages directories still say value not found.

So, I just want to make sure those are addressed (or dont matter?) before I attempt the upgrade.

Arantor

Those two values don't exist in 2.0 so it would be strange if you had them.

Sir Osis of Liver

Why is repair_settings flagging them on 2.0 install if they're not supposed to be there?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Doug Heffernan

#34
This topic is posted in a 2.1.x forum, so I assumed that the OP is using the 2.1.x? Are you using the 2.0.19 version @Cheri? Because if so this needs to be moved to the 2.0.x. board.

Quote from: Sir Osis of Liver on May 15, 2022, 02:00:45 PMWhy is repair_settings flagging them on 2.0 install if they're not supposed to be there?


That is a very good question @Sir Osis of Liver. I think that it is due to the fact that the repair_settings.php tool is compatible with both versions, 2.0.x and 2.1.x. And when being run in a 2.0.x forum, it throws those errors for things that do not exist for that version, but they do in 2.1.x. I have not checked the code for said file, but if that is the case I think that said file needs a version check, so it can skip those values from being checked while being run on a 2.0.x forum.

Sir Osis of Liver

Just ran current repair_settings download on 2.0.19 install, it doesn't find Custom Avatar URL or Custom Avatar Directory (/custom_avatar is created by 2.1 upgrade) but nothing about Tasks or Packages directories.  Possible database being used was damaged by initial borked upgrade and is partially upgraded?  Might just be that smfVersion is incorrect in smf_settings in 2.0.19 database.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Quote from: Sir Osis of Liver on May 15, 2022, 02:19:56 PMMight just be that smfVersion is incorrect in smf_settings in 2.0.19 database

If only that were how it worked, and I so wish people would stop treating it as a source of truth because it really isn't and hasn't ever been.

Why it gets hung up, I'm assuming is because the 2.1 upgrade files were dropped over the top of the 2.0 files, and then the 2.0 files dropped back over the top of the 2.1 files to roll it back.

But this wouldn't clean out of the files *added* by 2.1, such as Class-TOTP.php which is how repair_settings.php decides if it's 2.0 or 2.1, whether that file is present.

Cheri

@Doug Heffernan I was upgrading to 2.1.2 and the current version told me it was 2.1.2 so thats why I chose this board.  

The 2.1.2 upgrade failed, advice below is to restore the 2.0.19 backup and try upgrade. 2.0.19 is almost restored, with the question of those two directories.. if they wont impact the upgrade I can try again but I was waiting for advice before I do so I dont cause it to fail again. :-\




@Arantor .. yes.. first upgrade attempt was with Softaculous (I know, I know.) Then restored to 2.0, but it had issues!

Second attempt, I copied everything over. Fail. 

Lex suggested restoring 2.0 and fixing the themes, URLS, directories etc and trying again. 

So, now.. restored 2.0 again. I think this time the issues are fixed, except the question of these two directories.... tasks and Packages.... 

and I dont want to try the upgrade again until someone says I should try again "as is", because those directories wont impact the upgrader.... OR... what I should do to cure them. (repair does not change them)

Arantor

Delete Sources/Class-TOTP.php, repair_settings.PHP will revert to 2.0.

Cheri

Quote from: Arantor on May 15, 2022, 03:44:27 PMDelete Sources/Class-TOTP.php, repair_settings.PHP will revert to 2.0.
that worked! the repair found no issues now


So.. I just backed up again and Im going to do a manual upgrade from the beginning- overwrite everything and run the upgrader......... ~fingers crossed~

Advertisement: