News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF File doesn't support Database version

Started by Snow-Man, March 12, 2023, 11:38:30 AM

Previous topic - Next topic

Snow-Man

hello guys,
today I have made new forum and tried to back up old database and when I try to connect with back up i receive this error

QuoteSMF file version (2.1.3) does not match SMF database version (1.1.4). Run the SMF upgrader to fix this.
how to solve it

Arantor

It's telling you how to solve it - run the upgrader. You can't use a 1.1.x database in 2.1 without running the upgrade process to convert it from 1.1.x to 2.1 format.

Snow-Man

can you tell me how to do it? i have checked the guide but was hard to follow the instructions

Arantor

I'm not sure what you've done already - you put all the files for the 2.1 Large Upgrade on the server, make sure Settings.php points to your database (which you seem to have done) then visit upgrade.php to run the upgrade... and just follow the prompts.

Snow-Man

Quote from: Arantor on March 12, 2023, 11:59:19 AMI'm not sure what you've done already - you put all the files for the 2.1 Large Upgrade on the server, make sure Settings.php points to your database (which you seem to have done) then visit upgrade.php to run the upgrade... and just follow the prompts.

i have done that before but after logging in, in the 2nd step it says like this

QuoteBackup Database
Please wait while a backup is created. For large forums this may take some time!
Completed 0 out of 46 tables.
Current Table: "attachments"
Backup Complete! Click Continue to Proceed.
but i can not click on continue button down


Aleksi "Lex" Kilpinen

What do you mean you can not click the button? Why?
Does the upgrade script look ok, did you have any warnings or errors at any point?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Snow-Man

no error it only says Backup Complete! Click Continue to Proceed.
exactly here -> Overall Progress 4%

Snow-Man

i can provide more info or links if you want to

Aleksi "Lex" Kilpinen

You didn't really answer all the questions yet. How about taking a screenshot of exactly where it stops, and further explaining what is wrong exactly with it.

Also, please edit your post if you have something to add within the time you are allowed to modify it, and avoid unnecessarily double posting. Thank you.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF


Aleksi "Lex" Kilpinen

That looks like something is missing or misconfigured with SMF. Before running the upgrade, make sure all the settings (paths, urls, etc.) are correct - You can do this with repair_settings.php

What is repair_settings.php?

If this doesn't help, reupload everything in the upgrade package making sure to overwrite everything before trying again.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Snow-Man

#12
in the first time, i have installed full install from here https://download.simplemachines.org/ and then installed large upgrade so it replaced some files from full install then opened upgrade.php
thats what i did
tell me if i did something wrong

Quote from: Aleksi "Lex" Kilpinen on March 12, 2023, 02:00:20 PMThat looks like something is missing or misconfigured with SMF. Before running the upgrade, make sure all the settings (paths, urls, etc.) are correct - You can do this with repair_settings.php

What is repair_settings.php?

If this doesn't help, reupload everything in the upgrade package making sure to overwrite everything before trying again.
i have checked it before posting here, everything made on defaults, only database prefix changed to the one that i tried to restore old sql

Illori

usually when moving the install, we recommend you make sure the existing forum is working first before doing the upgrade. have you done this?

Snow-Man

its working
Quote from: Illori on March 12, 2023, 03:58:01 PMusually when moving the install, we recommend you make sure the existing forum is working first before doing the upgrade. have you done this?
its working but i put upgrade files into same place with forum files, its has been replaced
thats what i did

Snow-Man

Quote from: Aleksi "Lex" Kilpinen on March 12, 2023, 01:08:15 PMWhat do you mean you can not click the button? Why?
Does the upgrade script look ok, did you have any warnings or errors at any point?

i forget to mention on the main page of upgrade.php, there's a critical error and says Critical Error!
The upgrade script cannot find script.js or it is out of date. Make sure your theme paths are correct. You can download a setting checker tool from the Simple Machines Website

Sir Osis of Liver

Do you have the 1.1.4 install working?  Link to forum?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Snow-Man

Quote from: Sir Osis of Liver on March 12, 2023, 05:49:27 PMDo you have the 1.1.4 install working?  Link to forum?

i have installed the latest version of smf

Sir Osis of Liver

Assuming you have uploaded 2.1.3 Large Upgrade package to forum directory of a working 1.1.4 forum, you should be able to run upgrade.php without errors.  If you've moved the forum to a different directory or domain, you must correct all paths using repair_settings.php.  The upgrader is not finding files it needs to run the upgrade.  Either paths are incorrect, or files aren't where they're supposed to be.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Doug Heffernan

Most likely your paths and urls for themes and possibly other settings are not pointing to the right location. Run the aforementioned tool to straighten them out.

Regarding the upgrade, please see the following link:

Upgrading SMF



Snow-Man

i have used settings as default from the repair_settings.php and still the same
btw today i have tried to install smf version 1.1.15 and close versions to it but all the time i get something like this
QuoteThis page isn't working my forum link is currently unable to handle this request.
HTTP ERROR 500

Doug Heffernan

Quote from: Snow-Man on March 13, 2023, 12:47:48 PMi have used settings as default from the repair_settings.php and still the same
btw today i have tried to install smf version 1.1.15 and close versions to it but all the time i get something like this
QuoteThis page isn't working my forum link is currently unable to handle this request.
HTTP ERROR 500

A 500 error suggests there 's an issue with your server. Can you check the server error log page and see what errors are logged in there?

Snow-Man

Quote from: Doug Heffernan on March 13, 2023, 12:58:14 PM
Quote from: Snow-Man on March 13, 2023, 12:47:48 PMi have used settings as default from the repair_settings.php and still the same
btw today i have tried to install smf version 1.1.15 and close versions to it but all the time i get something like this
QuoteThis page isn't working my forum link is currently unable to handle this request.
HTTP ERROR 500

A 500 error suggests there 's an issue with your server. Can you check the server error log page and see what errors are logged in there?
how can i check the log?

EDIT:
i have checked the log on phpmyadmin-> smf_log_errors and there is nothing there
btw i have only extracted smf version 1.1.15 and was trying to install that version through install.php and i got that error mentioned before HTTP ERROR 500

Kindred

not the SMF log.  the SERVER log.

Talk to your host.
Сл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."

Sir Osis of Liver

I've imported 1.1.4 database into clean 2.1.3 install.  Trying to run repair_settings, only get first part of paths & urls, no buttons to save settings, no error.  We're connecting to database.  Tried current version of repair_settings, and older version.  Same result.  Can edit paths in db dump, but trying to avoid that.  Any ideas?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

<sigh>  After much dicking around, got upgrader running.  It craps out with "Unknown column 'restriction_type' in 'field list'".  If I remove 'restriction_type' from smf_banned, same error.  Lights out. >:(


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

                                     - R. Waters

shawnb61

#26
I think the 1.1 / 2.1 mix is confusing repair_settings.php. 

If you want to run repair_settings.php, copy over 1.1 code, then run it.  And use the current version - we made some changes that improve 1.1 support not too long ago.

The db checker should help identify which db changes are safe to delete:
https://github.com/sbulen/sjrbTools/blob/master/smf_db_compare.php

(EDIT: If it finds Subs-Db-mysql.php, it assumes 2.0.x.  If it finds Class-TOTP.php, it assumes 2.1.x.)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Doug Heffernan

Quote from: Sir Osis of Liver on March 13, 2023, 09:37:37 PMI've imported 1.1.4 database into clean 2.1.3 install.  Trying to run repair_settings, only get first part of paths & urls, no buttons to save settings, no error.  We're connecting to database.  Tried current version of repair_settings, and older version.  Same result.  Can edit paths in db dump, but trying to avoid that.  Any ideas?


You can also edit them directly at the database.

Kindred

If you have a 1.1.4 database in a 2.1.3 installation, repair settings WILL NOT work correctly.  If you got it to work correctly once, that was a fluke - not the other way around.
Сл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."

Sir Osis of Liver

Just getting back to this.  Was able to get an older version of repair_settings to partly work last night in php 7.4 (earliest version on this server is 7.0).  No theme paths, had to edit them manually.  When I got 2.1 upgrade to run it errored out at 23%.  2.0 upgrade starts and dies, 1.1.21 upgrade loads wsod.  Working on plesk server in Spanish, slow going. 

Tried importing db on my server last night, lot of mysql errors.  Will see if support can do it today.  The dump is really old, it's SMF 1.1.4 and was generated in 2012 in php 5.2, but appears to be complete.  If I can get it running on my server, have access to php back to 5.3, so should be able to upgrade it there.

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

                                     - R. Waters

Sir Osis of Liver

Imported db to my server, upgraded to 1.1.21 in php 5.3, forum up and running.  2.1 upgrade in php 7.4 fails with same error "Unknown column 'restriction_type' in 'field list'".  2.0 upgrade starts and dies. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

restriction_type was a 1.0 field on the smf_banned table.

It is finding that 1.0 table, so it is attempting to upgrade that table to 1.1.  (smf_banned became smf_ban_items in 1.1.)

If you are confident the DB is actually 1.1 (and not 1.0), you could skip the 1.1 step.

You may be able to skip that particular operation by renaming smf_banned to something else.

(The db checker might help ID exactly where that db is at...)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

The database is 1.1.4, I've upgraded successfully to 1.1.21 in php 5.4, it's up and running here.  repair_settings still not displaying theme paths, but I edited them manually in db.  2.0 upgrade in php 5.4 or 7.4 dies at around 14% with 30 sec timeout message.  2.1 runs in php 7.4 up to restriction_type error, can't get past that.  There's a step in upgrade_1-1.sql to $upgradeBanTable that deals with restriction_type, but it does a lot of things to restructure bans.

Not seeing a download link for smf_db_compare.php.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

Link to the utility was provided above.

If you are truly  1.1, you shouldn't need to run that step again.

First thing I'd do - as suggested above - is rename smf_bans & restart.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

#34
There are two tables in the 1.1.21 database, smf_banned and smf_banned_items, both are empty.  Only the first table contains restriction_type.

Dropped smf_banned, 2.1 upgrade is running.


Well, bugger me with a fishfork, 2.1 upgrade completed without errors.  And language was set to spanish.  Will import the db back to original server, see if it works there.

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

                                     - R. Waters

Snow-Man

everything is perfect now
i really appreciate Sir Osis of Liver helped me a lot to solve this problem

Sir Osis of Liver

Up and running here.  Everything seems to be working.  repair_settings can't find /Packages, /Sources/tasks, or /cache directories, all exist. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Of course it won't; none of $cachedir, $packagesdir or $tasksdir are settings in a 1.1.x Settings.php file - $cachedir came in during 2.0, the others in 2.1.

Sir Osis of Liver

Registration doesn't work.

Parse error: syntax error, unexpected '?' in /var/www/vhosts/asturmet.com/foro.asturmet.com/smf/Sources/Subs-Post.php on line 504


$current_protocol = strtolower(parse_iri($replace, PHP_URL_SCHEME) ?? "");

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

                                     - R. Waters

Sir Osis of Liver

Quote from: Arantor on March 14, 2023, 06:45:57 PMOf course it won't; none of $cachedir, $packagesdir or $tasksdir are settings in a 1.1.x Settings.php file - $cachedir came in during 2.0, the others in 2.1.

Yes, but repair_settings won't accept the correct paths.

Crap, Settings.php is still 1.1.  Will have to fix it manually.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Your parse error is because PHP is below 7.0.

Sir Osis of Liver

Yes, it was 5.6.  Was looking at the wrong domain.  Now repair_settings is damaging Settings.php if I save path to /cache.

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

                                     - R. Waters

shawnb61

I would copy a blank 2.1 Settings.php over from the 2.1.3 installer.

Then run the CURRENT version of repair_settings.php from the download site.

If there are still issues, I suspect env/os problems.

Note that the upgrader will in fact add missing entries to the end of Settings.php to bring it current.  And unless you tell the upgrader to rebuild Settings.php, it will just add & update entries as necessary.  (My 2.1 site's Settings.php said it was SMF 1.1 until recently...  That in & of itself isn't a problem...)  I just think this one was so borked at the db & file system level it got confused where it was at.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Quote from: shawnb61 on March 14, 2023, 07:48:33 PMI would copy a blank 2.1 Settings.php over from the 2.1.3 installer.
Did that.

QuoteThen run the CURRENT version of repair_settings.php from the download site.
That, as well.

QuoteIf there are still issues, I suspect env/os problems.
Will check it again tonight.  Think I checked a damaged Settings.php against a scratch file last night and they were the same except for forum specific settings.  Have a vague recollection of something Arantor had posted a few years back regarding damage to file header that could only be found/fixed using hex dump.  Did it once, but that was long ago and far away. :(
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: