SMF File doesn't support Database version

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

Previous topic - Next topic

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

Advertisement: