Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: beneidemthepilot on August 11, 2017, 03:12:57 PM

Title: Sudden 500 site error.
Post by: beneidemthepilot on August 11, 2017, 03:12:57 PM
Hi. My site uses SMF for user authentication using the SSI script. It's been working great for some time, however out of the blue, my site is giving 500 errors, both on the main site (which utilizes the SSI script on every page) and on the forums.

My moodle site is still working which is completely separated from SMF. I'm able to access CSS files. I'm only getting 500 errors on pages that are linked to the forums script. I have not made any filesystem or database changes recently. I don't see any error messages within the filesystem that would result from PHP. I do see some errors on the site level returned by the apache server saying that the "index.php" page for a subdomain (forums.seattlevirtualatc.org) that redirects to the actual forums at (seattlevirtualatc.org/forums/) via .htaccess is not found, but can't imagine being the cause.

This error seems to have happened out of the blue. The evidence above seems to point to something within SSI, or an included script, as that is the only link to the main site which is also receiving these errors.

Do you know of any previous occurrences, or ways I can begin troubleshooting to solve this issue? What tables, if any, should I check in phpmyadmin to find the cause and/or remedy? The only thing I can think of is an attack through the database. DNS is not the issue. Apache is not the issue. The only files producing the 500 error are files which include the SSI script, and the forums itself.
Title: Re: Sudden 500 site error.
Post by: vbgamer45 on August 11, 2017, 03:16:44 PM
Did your host do any kind of updates such as PHP version changes?
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 11, 2017, 03:39:47 PM
The hosting provider allows us to choose the PHP version for each subdomain. All of them still are at 5.6, as they were when I migrated there in February.
Title: Re: Sudden 500 site error.
Post by: vbgamer45 on August 11, 2017, 04:08:25 PM
What does it say in the apache error logs? or php error logs?
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 11, 2017, 04:36:19 PM
The only related lines in Cpanel's "metrics -> Errors" only show a "file not found" when attempting to access forums.mywebsite.org/index.php. This subdomain uses .htaccess to redirect to mywebsite.org/forums/, where the index file is present. I've had no problems with this process before. The only other errors are associated with moodle, which shouldn't be a factor here.

There are no PHP error logs to be found in any smf folders.
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 11, 2017, 04:41:52 PM
Attached is the only error that I can seem to find. Simply an HTML error 500 inside the internet browser.
Title: Re: Sudden 500 site error.
Post by: shawnb61 on August 11, 2017, 06:52:06 PM
Anything unusual in the permissions for the files in those folders?   
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 11, 2017, 09:22:56 PM
I just noticed that in my addon theme, the folder permissions are 777 and files were 666.

should I change those to 755 and 644?
Title: Re: Sudden 500 site error.
Post by: Sir Osis of Liver on August 11, 2017, 10:26:26 PM
Some servers block 777 for security reasons.  755 and 644 should work.
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 11, 2017, 10:44:44 PM
Thanks. I've changed that. I imagine this would make it more secure. It's been working fine with the other permissions though, so I'm still having the issue described above.
Title: Re: Sudden 500 site error.
Post by: Sir Osis of Liver on August 11, 2017, 11:02:02 PM
Am able to link to forum .txt and .html files in seattlevirtualatc.org/forums/, but php files are being blocked.  Got a quick look at what appeared to be a security app I didn't recognize, but only once.  Best guess it's something your host did, probably security related.
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 11, 2017, 11:18:10 PM
Thanks. I've already submitted a support request with them as well and will add your comment to the ticket.
In the event I need more help from you, should I comment here again or make a new post?

Thank you.
Title: Re: Sudden 500 site error.
Post by: Sir Osis of Liver on August 11, 2017, 11:23:03 PM
Stay with this topic, it contains background info support team will need.  While you're waiting, you could do a clean install in another directory, import your production database, and see if it works.

Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 12, 2017, 07:56:54 PM
The hosting provider could not find any logs of HTML 500 errors, or other related logs which could identify an issue.
They responded suggesting to disable ModSecurity as that can sometimes block php files. The same error resulted with modsecurity disabled. I have re-enabled it.
I then opened a new directory, installed SMF fresh with v2.0.14 with a new forums user, but the same database as before.
Within this new directory, it is pulling the theme from the old directory, and appears to be working fine.

Because the fresh install works, this makes me wonder if a file with v2.0.13 could have been altered?
Title: Re: Sudden 500 site error.
Post by: Deaks on August 12, 2017, 08:04:19 PM
could of been something in the database not updating correctly or a file was not patched correctly, if its working now try running repair_settings and move the paths so you can delete old forum files.
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 12, 2017, 08:42:35 PM
Thanks Bryan. Everything seems to be working just fine now. Nothing looked abnormal in repair_settings on the old forum installation, however the fresh installation of 2.0.14 (i had .13 before this) has my site back up and running.
Title: Re: Sudden 500 site error.
Post by: Deaks on August 12, 2017, 08:44:46 PM
so you ok with marking as solved?
Title: Re: Sudden 500 site error.
Post by: beneidemthepilot on August 12, 2017, 11:14:15 PM
Yep. Just did it. Thanks.