News:

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

Main Menu

Error 500...

Started by Gryzor, September 26, 2021, 02:21:50 PM

Previous topic - Next topic

Gryzor

So, I thought I was getting Error 500 from the server because I updated the OS and it installed PHP 7 while I was on 2.0.13 (https://www.simplemachines.org/community/index.php?topic=579127).

So I copied the files form the upgrade to the forum folder, changed owner/group to www-data but... still getting error 500? Could someone help me troubleshoot it?

Thanks!

Aleksi "Lex" Kilpinen

Check your server's error log, what is causing that 500 error?
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

Shades.

Usually when this happens to me its a permissions issue. Check your file permissions .php files should be 644 and directory folders 755. That's what it is on my server anyhow. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Gryzor

Hmm, I'm causing a 500 repeatedly but no new entries in car/log/apaxhe2/error.log possibly logging is set insufficiently?

Gryzor

#4
Quote from: Shades. on September 26, 2021, 03:08:15 PMUsually when this happens to me its a permissions issue. Check your file permissions .php files should be 644 and directory folders 755. That's what it is on my server anyhow. ;)

Upgrade.php is 644 already... 😓 Oh also before the server update everything worked fine with permissions such as they were so I don't know...

Will have to check the rest I guess, will report back. Thanks for the advice gentlemen!

Steve

Quote from: Gryzor on September 26, 2021, 02:21:50 PMI was on 2.0.13

Are you still on 2.0.13? I think I read somewhere that you've upgraded but just wanted to be sure.
DO NOT pm me for support!

Gryzor

Quote from: Steve on September 26, 2021, 07:12:47 PM
Quote from: Gryzor on September 26, 2021, 02:21:50 PMI was on 2.0.13

Are you still on 2.0.13? I think I read somewhere that you've upgraded but just wanted to be sure.

Trying to. Had 2.0.13, copied the files over for 2.0.18, everything I try to run, be it index.php or upgrade.php gives an error 500. Will pull some error messages from the log soon!

Gryzor

Ok, so I was looking at the wrong apache error log, apologies for that. Found the correct one and I see these errors:

[Sun Sep 26 16:31:31.671440 2021] [:error] [pid 14138] [client 51.222.253.7:39062] PHP Fatal error:  require_once(): Failed opening required '/QueryString.php' (include_path='.:/usr/share/php') in /httpdocs/forum/index.php on line 51
[Sun Sep 26 16:33:43.369467 2021] [:error] [pid 15750] [client 51.9.217.46:61703] PHP Notice:  Undefined variable: boarddir in /httpdocs/forum/index.php on line 47
[Sun Sep 26 16:33:43.369537 2021] [:error] [pid 15750] [client 51.9.217.46:61703] PHP Notice:  Undefined variable: sourcedir in /httpdocs/forum/index.php on line 51

Line 51 is
require_once($sourcedir . '/QueryString.php');
Line 47 is
if ((empty($cachedir) || !file_exists($cachedir)) && file_exists($boarddir . '/cache'))
Any ideas? Not sure these are enough to cause an error 500, still...

Arantor

Check Settings.php is not empty.

Gryzor

Um... that's really weird. I was 100% it wasn't empty, because I used it *just* this morning (CET+2) to read the db settings and it was fine. But I thought, well, let's check, and it's now 0 bytes long! Will look a bit more into it...

Gryzor

Soooo yeah, I replaced Settings.php with a backup. Made it writeable, upgrade.php started and...

Error!
Unknown Error!

This at the Database Changes step, Changing Column Names (1 of 43). Any more ideas?

Damn, it's never been so troubling... :( Thanks for the help guys, really appreciate it!

Just ran repair_settings.php, everything seemed correct. Saved anyway and trying again... Same error. Don't know if the script is taking a looong time or stuck... "Time elapsed" remains stuck (20mins).

Illori

if you are upgrading from 2.0.* to 2.0.18 you dont need to run upgrade.php.

Gryzor

Oh cr*p. Hope I didn't brake anything by running it?

Illori

it should not cause any issues.

Gryzor

Thank you, doctor😀 is there a way to stop the script? Reboot the machine?

Gryzor

All's fine now. Thread can be marked as Resolved.

Thanks everyone, and have a great day!

Aleksi "Lex" Kilpinen

Glad to hear :)
Quote from: Gryzor on September 27, 2021, 03:02:02 PMThank you, doctor😀 is there a way to stop the script? Reboot the machine?
Generally, I'd say it is better to just let it do it's thing uninterrupted. Less chance of something going wrong.
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

Gryzor

In the end I left the script running through the night, page was stuck. Maybe the script had aborted, but the page was the same. Forum was perfectly functional...

Advertisement: