Advertisement:

Author Topic: Inherited site - would appreciate suggestions for upgrading it  (Read 445 times)

Offline BassWrangler

  • Newbie
  • *
  • Posts: 6
Inherited site - would appreciate suggestions for upgrading it
« on: February 20, 2021, 01:14:44 PM »
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:

Code: [Select]
The upgrader was unable to find some crucial files.
In the Apache logs, are messages like this:

Code: [Select]
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.





Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,832
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #1 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
« Last Edit: February 20, 2021, 01:38:06 PM by Aleksi "Lex" Kilpinen »
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"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

Offline Cyber Liberty

  • Newbie
  • *
  • Posts: 1
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #2 on: February 20, 2021, 01:27:59 PM »
I am an Admin working with @basswrangler.....

Offline BassWrangler

  • Newbie
  • *
  • Posts: 6
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #3 on: February 20, 2021, 02:07:24 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!

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,832
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #4 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/
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"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

Offline Steve

  • Freak
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 4,812
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #5 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.
Please do not PM me for support.

I just ordered a life alert bracelet so
if I get a life, I'll be notified immediately.

Offline BassWrangler

  • Newbie
  • *
  • Posts: 6
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #6 on: February 20, 2021, 03:09:25 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).

Offline BassWrangler

  • Newbie
  • *
  • Posts: 6
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #7 on: February 20, 2021, 03:11:46 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.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,832
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #8 on: February 20, 2021, 03:14:19 PM »
I have seen that happen sometime in the past, it's possible - can't really remember what caused it to happen though. 
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,210
  • Gender: Male
    • Kindred-999 on GitHub
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #9 on: February 20, 2021, 03:54:49 PM »
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.
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."

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,655
  • Master of BBC Abuse
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #10 on: February 20, 2021, 04:09:09 PM »
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].

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Project Manager
  • SMF Super Hero
  • *
  • Posts: 19,832
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • My Daily Dose Of Blasphemy
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #11 on: February 20, 2021, 04:29:51 PM »
Yup, all this sounds familiar - it's been a while I've seen those issues the last time though.
A Finnish Project Manager (Support Specialist)
Happily running multiple SMF 2.x installations.
 Fooling around with an i7-10700 @ 2,90GHz-4.80GHz / 16Gb / RTX-2070 Super / 3840x2160 / Win 10 x64


How you can help SMF

"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

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,655
  • Master of BBC Abuse
Re: Inherited site - would appreciate suggestions for upgrading it
« Reply #12 on: February 20, 2021, 04:35:17 PM »
Aha! I knew I'd stashed it somewhere. [Unknown]'s Awesome CHMOD script:
 
Code: [Select]
<?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.