News:

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

Main Menu

How do I update PHP once locked out?

Started by matritte, March 03, 2021, 03:18:23 PM

Previous topic - Next topic

matritte

Hey guys.

I updated to the 2.18 version today, and now I am locked out of my site. From what I can figure (after talking with my host), I was on an old php 5.6, and now nothing will load. What are my options? I can't get into the site at all. It's just a blank, white page.

What is the best way to upgrade php 5.6 to the latest working version?

Thank you.

Antechinus

You need access to your hosting control panel (cPanel, Plesk, etc). Do you have that access?

matritte

Quote from: Antechinus on March 03, 2021, 03:42:06 PM
You need access to your hosting control panel (cPanel, Plesk, etc). Do you have that access?

I do. It's CPanel. I am in there trying to figure out what to do.

Thanks.

Antechinus

Ok. Near the bottom of the main cPanel page there is a section labelled "Software". In there is "MultiPHP Manager". That's what you're after.

matritte

Quote from: Antechinus on March 03, 2021, 03:49:27 PM
Ok. Near the bottom of the main cPanel page there is a section labelled "Software". In there is "MultiPHP Manager". That's what you're after.

Thanks. I see it. What version should I use if I upgraded to 2.18?

Also, in the "MyPHP" Database it says I am using version 5.6, yet under MultiPHP it says 7.3.

Antechinus

If by "MyPHP" Database you mean phpMyAdmin, yes that can run on a different version. For example, my site is running 7.4 for the site itself, but 7.3 for phpMyAdmin (the host set it like that, and it's fine).

Although 5.6 is pretty old. Using 7.3 for the forum is fine, but I'd expect 7.something for phpMyAdmin as well. The important question is: does everything work without errors?

matritte

Quote from: Antechinus on March 03, 2021, 03:58:19 PM
If by "MyPHP" Database you mean phpMyAdmin, yes that can run on a different version. For example, my site is running 7.4 for the site itself, but 7.3 for phpMyAdmin (the host set it like that, and it's fine).

Although 5.6 is pretty old. Using 7.3 for the forum is fine, but I'd expect 7.something for phpMyAdmin as well. The important question is: does everything work without errors?

No, nothing works. I have the white screen of death. The host's tech support told me this is because my website files are old and version 5.6. They claim I need to update those website files, and then everything will work properly. I don't know how to do that without having access to the site (i.e. I have white screen of death).

Ps. Yes "phpMyAdmin" is what I meant. It shows 5.6 there and 7.3 under MultiPHP. Attached here is an image: https://i.imgur.com/ueVc3ad.jpg

Thank you.

Antechinus

Sounds entertaining. My instincts are to call BS on that, since if the site was working before, and if all that was done was installing the 2.0.18 patch, then the files should be fine.

However, as long as you can upload files to your server (via FTP, or cPanel file manager) then you can put a fresh set of files in place. That's not hard to do, but would clear any file edits made by mods, so mods may have to be reinstalled (not difficult, if everything is working).

To install fresh files you need the contents of this zip: https://download.simplemachines.org/index.php?thanks;filename=smf_2-0-18_upgrade.zip

Out of curiosity: which host are you using?

matritte

Quote from: Antechinus on March 03, 2021, 04:11:34 PM
Out of curiosity: which host are you using?

It's JustHost.

Thanks, I will go install those now. I'd use Cpanel over FTP. Is it just a matter of copy and pasting them into the directory?

Antechinus

Yep. Do the whole lot. Overwrite the old files. :)

Antechinus

Oh hang on. Wait a second.

Do not overwrite Settings.php or Settings_bak.php. Just do all the other files.

matritte

Quote from: Antechinus on March 03, 2021, 04:19:47 PM
Yep. Do the whole lot. Overwrite the old files. :)

Okay, cool. I will try this now.

It looks like in the directory there are folders and files that are not included in the set you gave me. i.e. more folders and files in the old set. Should I delete those entirely?

matritte

Quote from: Antechinus on March 03, 2021, 04:21:06 PM
Oh hang on. Wait a second.

Do not overwrite Settings.php or Settings_bak.php. Just do all the other files.

Ok.

Antechinus

Quote from: matritte on March 03, 2021, 04:22:02 PM
Quote from: Antechinus on March 03, 2021, 04:19:47 PM
Yep. Do the whole lot. Overwrite the old files. :)

Okay, cool. I will try this now.

It looks like in the directory there are folders and files that are not included in the set you gave me. i.e. more folders and files in the old set. Should I delete those entirely?
Nope. They are probably from mods. Just leave them for now.

matritte

Hm. So that did nothing, and it still shows as "Database client version: libmysql - 5.6.43"

So the files didn't appear to update. It is still the white screen of death.

matritte

Scratch that. It does work now!

I had to run the repair.settings.php script (any idea why it needed this run?).

Also, it still does show the myphpadmin files as version 5.6 even after all this.

Antechinus

It shouldn't have needed repair_settings unless someone changed a setting somewhere. I can't tell which one would have been changed, or by who.

Ok, working is good. What about mods? Do you have any?

Quote from: matritte on March 03, 2021, 04:32:16 PMAlso, it still does show the myphpadmin files as version 5.6 even after all this.

You don't have any control over that. That's entirely down to the host, unless you're managing the actual server by yourself (ie: unmanaged hosting, with dedicated box or VPS).

ETA: And 5.6 is perfectly fine for libmysql. The PHP version it's running is 7.3, which is pretty normal.

matritte

Quote from: Antechinus on March 03, 2021, 04:38:13 PM
It shouldn't have needed repair_settings unless someone changed a setting somewhere. I can't tell which one would have been changed, or by who.

Ok, working is good. What about mods? Do you have any?

I haven't checked that yet, but so far everything looks good. Thanks for your help.

The only issue I see so far is it says "! There are 2 topics and 0 posts awaiting approval in this board. Click here to view them all." under every topic on my forum, and there is a large red exclamation point next to each topic. I've never had this in the past. I assume this is a setting in the software itself? I will have to dig around. Also, under the maintenance tab it's not fixing the errors it finds.

Edit: it looks like all my mods are gone, but not a huge deal I didn't use many.

Antechinus

You should be able to reinstall the mods via the usual method. The approval warning is an odd one. Should be fixable by going into the moderation centre and approving the lot in one hit.

matritte

Quote from: Antechinus on March 03, 2021, 04:49:05 PM
You should be able to reinstall the mods via the usual method. The approval warning is an odd one. Should be fixable by going into the moderation centre and approving the lot in one hit.

Could I send you a quick pm?


Antechinus

This one is a good one. Getting errors in the log for...

8: Undefined index: topic_gone

8: Undefined index: registration_disabled

8: Undefined index: attachment_not_found


Now these are all standard SMF strings, found in standard SMF files, all of which are present and accounted for. All files are up to date.

So how the @^@#$ does one generate an undefined index error for a standard SMF string, called from a file which is present and up to date?

ETA: Also getting this...

Unable to load the 'Errors' template.

But again, the file in question is present and up to date.

live627


Antechinus

Also getting 30 of odd errors similar to this (range of topics) when running the "Find and repair...".

Topic #55 has the last message ID 6966, which is incorrect.

Now the odd thing here is that the moderation centre is also showing 33 unapproved topics, but there are only 30 listed in "Find and repair...", and there are no topic details visible at all in moderation. All it will display is the (33) on the Topics button.

Oh, and "Find and repair..." won't fix those message ID errors anyway. Doesn't actually do anything when you run it.

I'll throw the stack trace mod in and see what it shows us.

Shambles

Which file(s) are reporting these indexing errors?

Antechinus

#25
Hmm. Well I cleared the log, on the basis that it would generate new ones and I wanted to see what happened then. Now it's not making new ones. :P I have no doubt it will, but I've cycled through a stack of functionality and none have popped up yet.

However, the unapproved topics count in the mod centre is jumping around. It has shown 33, 2 and 1 and then back to 33, with nothing being done.

By the way, I just trawled back through his admin log, and it appears he installed ad management twice by mistake some time back. Haven't dug into that yet.

Uninstalled package: "Ad Managment", version 3.3a April 30, 2020, 03:28:09 PM
Installed new package: "Ad Managment", version 3.3a July 02, 2018, 05:13:53 PM Possible whoops - installed twice??
Installed new package: "Ad Managment", version 3.3a July 02, 2018, 11:39:33 AM
Uninstalled package: "Ad Managment", version 3.3a July 02, 2018, 11:38:06 AM
Upgraded package: "Ad Managment" to version 3.3a July 02, 2018, 07:47:05 AM


I'd chill on this for the moment. He says the forum works fine for normal members, so this other stuff can be sorted as suits. I'm pretty sure at least part of the problem is mods. He's now saying (by PM) that he thinks he may have got some files mixed up. I'll ask him for cPanel so I can see first hand WTF is going on, and get back to it in a few more hours when I have more time.

ETA: Oh and when there were errors in the log, stack trace didn't seem to be showing anything that wasn't there before I installed it.

ETA2: Oh yeah, apparently the server somehow failed to create Settings_bak.php too, so that's another bit of fun. If he gives me cPanel access I'll sort that manually. I get the feeling there's quite a bit of crud hanging around.

Illori

this really is not in the right board, mind we move it to the proper support board?

Antechinus

If you want to do that, best to merge it with the existing support thread.
https://www.simplemachines.org/community/index.php?topic=576985.0

There haven't been any posts in that thread after the OP of this thread, so the merge shouldn't mess anything up.

Steve

DO NOT pm me for support!

matritte

Ah, yes, I made a new thread about this, not realizing Antechinus was working on it in this thread.

Is it possible to combine threads, mods?

Advertisement: