News:

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

Main Menu

How to tell which version SMF?

Started by RolfBly, August 06, 2024, 11:45:15 AM

Previous topic - Next topic

RolfBly

I've inherited a site to maintain. In the past, from probably around 2006 to about 2013, it had a lively forum running on SMF with WebsiteBaker CMS.

In 2013, the site was made over to WordPress. The forum was not transferred, but the database containing it was left alone. The site is currently running a bbPress forum. I've tried to import the SMF forum using the bbpress import feature, to no avail. It doesn't see any forum component.

Now, I understand support with migrating is more of a bbpress question than an SMF question, but starting at the beginning: is there any way I can tell which version SMF the old forum must have been?

In the database, all forum tables (33 of them) start with the name mod_smf_forum.

Aleksi "Lex" Kilpinen

smf_settings should hold the version number the database was last updated to.
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

RolfBly

Yup, thank you. smfVersion 1.0.6. Hmmm...


vbgamer45

I believe our SMF upgrade can handle all the old versions so you can upgrade to latest SMF 2.1.4 OR SMF 2.0.x
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Doug Heffernan

Indeed. You can upgrade directly to the latest version, 2.1.4.

RolfBly

Thanks guys  :) 

I have only the SQL database readily available. I don't have the forum software itself up & running.

I do have an old copy of the entire site (with WebBaker stuff) from about 2006. It seems like a lot of trial & error to get that running (or only the forum). Although it's not likely that anything under the hood was ever modified.

Would I be able to install SMF latest version, somehow connect the old database and then convert?   

Or should I try & set up old version, install new version alongside it and then convert? 

Doug Heffernan

Quote from: RolfBly on August 06, 2024, 03:23:11 PMWould I be able to install SMF latest version, somehow connect the old database and then convert?   

It depends if the converter is compatible with the latest smf version. (haven't checked it)

If that's the case, then yes you can install a fresh new 2.1.4. copy, import the old database backup then extract the upgrade.php and .sql files from the large 2.1.4. package and upload them to the root your forum folder and run the upgrader to bring the database up to date with the forum files.

Aleksi "Lex" Kilpinen

I think you would only really need the settings.php -file and attachments folder from the original install, and of course the database. Update DB info in the settings.php file to reflect the current database address and credentials if they aren't already correct, and then you should basically be able to just follow the upgrade process.
Upgrading SMF

EDIT:
This is assuming the path and urls are the same as before - If they are not, then there would probably have to be some further steps to get those corrected.
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

shawnb61

You need the file system backup if you want to keep attachments & avatars.  If not, db-only can work.  Ideally the file system backup is sync'd with your DB backup, e.g., and references the same sets of attachments & avatars.

The way the SMF upgrader works is in-place - you extract the files & run it on top of the old forum.  You don't need a separate copy of the DB, for example.  (Though you should have lots of BACKUPS - of the file system & DB!!!)

IIRC, 1.0.x had some DB changes within the first few point releases.  You might bump your head against that...  But a 1.0 => 2.1.4 upgrade is certainly doable. 

This recent advice regarding an early 2.0 upgrade applies to 1.0 as well:
Quote from: shawnb61 on July 27, 2024, 02:35:48 PMNormally, if possible, I'd like folks to confirm the forum is fully operational ..., before the upgrade, but if you're on such an old version that is not always possible.  But running repair_settings.php after a move or reconfiguration of any sort is a hard requirement.

The upgrader can be cranky, especially where there are DB changes it doesn't know about.  We have seen folks actually remove or redefine core SMF columns, which is bad.  Or mods add new tables & columns that don't have default values, and the new versions of mysql don't like that.  Or they have manually done a utf8 conversion (sometimes unknowingly...) without updating the proper settings in SMF.  Or they somehow miss or muff the attachment folders, which can result in 100% of your attachments going away...

So sometimes it takes a couple tries to work thru those issues. 
A question worth asking is born in experience & driven by necessity. - Fripp

RolfBly

Thanks again, guys. TL;DR: I think I'll have to call our provider.

Here's what I found out meanwhile.

  • SMF as it used to be, was installed as a Website Baker module. There's a `\wb\modules\smf_forum\install.php` (with a Website Baker copyright text). It drops any existing forum tables and then creates new empty ones. That's not what I want.
  • Also, bbpress SMF import was tested with SMF 2.0.4 and 2.0.7. Om bbpress' forum, I found they stopped work on the SMF import in 2015 and support for version 2.1 was never implemented, AFAICT.
  • It's OK if the old forum can be browsed and read, there's no need to get it up & running completely.

I can't use the original url's, but I did set up a subdomain. It comes with PHP 8.3.6, site management is with Plesk. I can't change that.

Copying the old forum into the new directory and running any php runs into some errors having to do with deprecated php functions.

Then, following Lex' advice:
Quote from: Aleksi on August 06, 2024, 03:29:11 PMyou would only really need the settings.php-file and attachments folder from the original install, and of course the database. [...] then you should basically be able to just follow the upgrade process.

I adapted Settings.php, added it to the 2.0.19 upgrade package, uploaded & unpacked it; checked that readme.html is served properly, and then tried to run upgrade.php. That failed.

I've attached the error message. The file /oudeforum.ourdomain.nl/smf_forum/Sources/Subs.php is there, rights are 644, I changed to 666, didn't make any difference.

I'm going to contact our provider.

So far, thanks for all the hints & tips, guys. 

shawnb61

Just a note: the upgrader wants php & mysql versions for the version you are upgrading TO (not from).

For SMF 2.0.19 I'd suggest php 8.0 & mysql 8.

For SMF 2.1.4, I'd suggest php 8.2 & mysql 8.0+.

A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

Also...

Basedir restrictions usually mean you're trying to access folders you're not supposed to...

Probably fixed by reviewing repair_settings.php.

Sometimes this is a host config issue,  but in this case, I'd review repair_settings.php.
A question worth asking is born in experience & driven by necessity. - Fripp

RolfBly

Quote from: shawnb61 on August 08, 2024, 10:05:00 AMJust a note: the upgrader wants php & mysql versions for the version you are upgrading TO (not from).

For SMF 2.0.19 I'd suggest php 8.0 & mysql 8.

Thanks, I understand that, but the php versions are not for me to decide - or not in this environment anyway.

(continued in reply to your next post).

RolfBly

Quote from: shawnb61 on August 08, 2024, 10:21:50 AMProbably fixed by reviewing repair_settings.php.

Sometimes this is a host config issue,  but in this case, I'd review repair_settings.php.

Thanks, I'll certainly look into that.

[Edit:] I couldn't find any repair_settings.php, in the forum root nor in Sources. This is the 2.0.19 upgrade. Does that make a difference?

Also, right now our provider's helpdesk are also looking into it.

If all fails, I'm thinking of setting up a Docker with the proper versions and try that. I'm not so experienced with Docker, tho'.

Illori


Steve

Just emphasizing one very important statement from the link Illori gave you. Make sure you delete repair_settings when you're done.
DO NOT pm me for support!

RolfBly

Meanwhile, our provider's helpdesk was able to get the Upgrade utility up & running.

The problem was in the paths to the site, they had to be something with vm's (/var/vm.. ). 

So I ran the upgrade and it went successfully.

Case closed for now.

Many thanks to you all for all the help! 

Advertisement: