Inherited site - would appreciate suggestions for upgrading it

Started by BassWrangler, February 20, 2021, 01:14:44 PM

Previous topic - Next topic

BassWrangler

I am a member of a forum that is run using SMF 2.0.13. The person that was administering the site has vanished, and so I am looking to help the site owner with an upgrade. I have zero notes on what was done to the site previously, other than the previous admin tried to upgrade from 2.0.13 to 2.0.16 and was not able to.

To help me figure this out, I created a virtual machine on my local desktop, installed CentOS in the VM (it's closest to what the hosting provider uses), installed the supporting software (like mysql), copied the files over from the live site, made a database back-up and restored this to the local VM. I am now able to run the site locally, and using virtual machine checkpoints can try things out and restore back to a known state without fear of breaking anything.

However, being new to SMF, I was hoping for some suggestions as to the best way to proceed. I tried to do an upgrade following the instructions in the "Upgrading" section in the docs and the 2.0.18 upgrade archive. However, I get this error when I load upgrade.php in my browser:

The upgrader was unable to find some crucial files.

In the Apache logs, are messages like this:

Undefined index: upgrade_upgrade_utility in /var/www/myforum/upgrade.php on line 3548 , referer: http://www.myforum.localdomain/upgrade.php

Their forum has the following packages installed:


Indent BBC1.0.1
SMF 2.0.14 Update1.0
Embed Vine Videos BBCode1.2
Ignore Topics2.3
Social Bookmarks2.0
Integration Hooks Report1.5.3
Aeva ~ Auto-Embed Video & Audio7.1
PHP Information Mod1.0.3
Add Facebook Like to Posts1.1
Optimus Brave1.8.4
@mention members1.1.2

There are also some HTML changes to customize the site. I actually have a detailed analysis of what files were changed over a stock 2.0.13 install, and can provide that if it's useful.





Aleksi "Lex" Kilpinen

#1
There seems to be a .14 update installed, so the next step should be .15 if that earlier install was completed succesfully. You should be able to test installing the 2.0.15 update straight from the admin panel, and if it works then 2.0.16 next and so on.
https://wiki.simplemachines.org/smf/Patching
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

BassWrangler

Quote from: Aleksi "Lex" Kilpinen on February 20, 2021, 01:22:11 PM
There seems to be a .14 update installed, so the next step should be .15 if that earlier install was completed succesfully. You should be able to test installing the 2.0.15 update straight from the admin panel, and if it works then 2.0.16 next and so on.
https://wiki.simplemachines.org/smf/Patching

Although it says that package installed, I don't think it actually installed correctly, because the site still says "2.0.13" at the bottom of the page.

However, on the site in my local Virtual Machine, after correcting an issue with directory permissions, I was able to re-run this patch/package, and then from there do each incremental update to 2.0.18. I need to verify that everything is working correctly, but it looks OK so far.

Thank you!

Aleksi "Lex" Kilpinen

Alright, let us know if you have further questions :) Also, you can check exactly what each update does, to make sure if a specific update has been installed correctly or not. The edits each package makes can be seen at https://custom.simplemachines.org/upgrades/
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

Steve

If you're wanting to update to 2.0.18 you could always do the full upgrade instead of patching. Your mods will need to be reinstalled though.
DO NOT pm me for support!

BassWrangler

Quote from: Steve on February 20, 2021, 02:31:22 PM
If you're wanting to update to 2.0.18 you could always do the full upgrade instead of patching. Your mods will need to be reinstalled though.

That's my fall-back plan if necessary, and it might be a good way to address issues if the previous admin has "hacked" source files (possible).

BassWrangler

Quote from: Aleksi "Lex" Kilpinen on February 20, 2021, 02:29:56 PM
Alright, let us know if you have further questions :) Also, you can check exactly what each update does, to make sure if a specific update has been installed correctly or not. The edits each package makes can be seen at https://custom.simplemachines.org/upgrades/

Thank you, this is very helpful. I rolled my VM back to the unmodified state, and then repeated the process of uploading and installing the 2.0.14 patch. After doing this, I spot checked a few files in Sources to see if they had the changes in the changelog you linked to. It does appear that they are there now. So I'm not sure what happened, but apparently when he tried to upgrade before, it added an entry to the database saying the package was installed, but it didn't actually make the changes to the files.

Aleksi "Lex" Kilpinen

I have seen that happen sometime in the past, it's possible - can't really remember what caused it to happen though. 
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

Kindred

It has to do with the file permissions and how php is installed/run

in some configurations, php is run as "nobody" so, although the system THINKS (and reports) that the permissions are correct and that the files are changed, when it gets to the application of changes, the system (deeper) rejects that ability of php to make changes to the files directly and rejects the uipdate (but does not report the rejection)

The correction is to make the folders/files have 775/664 or maybe 777/666 chmod, unless that causes other issues with your system.
Сл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."

Antechinus

I vaguely recall having issues with directories owned by "nobody" years ago. It was impossible to chmod them via FTP or cPanel (due to the user not being recognised as owner). To make them behave I ended up using a PHP chmod script provided by [Unknown].

Aleksi "Lex" Kilpinen

Yup, all this sounds familiar - it's been a while I've seen those issues the last time though.
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

Antechinus

Aha! I knew I'd stashed it somewhere. [Unknown]'s Awesome CHMOD script:

<?php

shell_exec
('chmod -R 777 .');

?>


Will CHMOD all files owned by "nobody". May not work if your host only allows 755, in which case simply change the code to say 755 instead of 777. Save it as a PHP file with any name, and upload to the root directory of your forum. Run the file in your browser.

Note: Do not leave this file in place after use. It is a security risk if it is left in place.

Advertisement: