News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

500 Internal Servor Error

Started by Tikkuy, February 17, 2013, 10:48:25 AM

Previous topic - Next topic

Tikkuy

#20
Quote from: xrunner on February 21, 2013, 10:07:11 AM
Quote from: Tikkuy on February 21, 2013, 09:59:56 AM
Anyone? :'( I don't wanna lose the forum again!

In my Cpanel they have a backup app that allows me to go back to any day in the past - it's called R1soft Restore Backups. It automatically makes entire backups of the site every day. If you have it your Cpanel you could try it. Just go back beyond the day you were having problems. Maybe someone smarter than me can provide a better solution though ...

Thanks for the advice! I think that must be a custom addon as I don't have that on my cPanel, but I might try to install it or something later.

Quote from: CoreISP on February 21, 2013, 10:16:37 AM
Usually, a error_log is generated in your public_html or the forum directory.
Without the error_log, it is near impossible to determine the cause.
There must be one in cPanel anyway...

Either find it, or ask your host to grab the details from the main server log.

Alright, so I was able to contact my host and they sent me the latest error log! I've attached the whole thing to this post, so feel free to let me know if you see anything strange.

Quote from: MrPhil on February 21, 2013, 12:47:14 PM
If it's a permissions and/or ownership problem, you can see that through your hosting control panel, or maybe an FTP client. Be aware that many servers will silently ignore permission change requests from FTP clients, and you'll have to use your hosting control panel. If ownership is wrong, usually your host will have to fix that for you. Files should normally be 644 and directories 755, although some may need to be 664/775 for PHP and SMF to write to them. They should almost never be 666 or 777. In fact, some servers run security software such as suPHP that will block access (500 error) to "world writable" (xx6 or xx7 permissions) files and directories.

There are other causes of 500 Internal Server errors. See my sig > FAQs > 500 (Internal Server) Errors for more hints. These include bad .htaccess or php.ini entries and blank lines at beginning or end of files.

This was really helpful, thanks a lot. I've had a look at your FAQ and I'll keep it in mind if we can't figure anything out from the error logs!

MrPhil

Your error log shows that the session code is trying to open /var/php_sessions/sess_324bf7e30bcd2f054bd65c91bf0a7f1d and is failing. I don't know offhand if /var/php_sessions is something configurable in SMF or if PHP has that hard coded in (I can look this weekend). You might mention to your host that your PHP application (SMF) is trying to write a session file there and failing -- is that the wrong place, or does PHP not have permission to do so, or is there some other problem.

Tikkuy

Quote from: MrPhil on February 22, 2013, 09:56:19 AM
Your error log shows that the session code is trying to open /var/php_sessions/sess_324bf7e30bcd2f054bd65c91bf0a7f1d and is failing. I don't know offhand if /var/php_sessions is something configurable in SMF or if PHP has that hard coded in (I can look this weekend). You might mention to your host that your PHP application (SMF) is trying to write a session file there and failing -- is that the wrong place, or does PHP not have permission to do so, or is there some other problem.

Thanks a lot for your help! I've contacted my host about it although I'm not sure entirely how much help they'll be. Should I possibly be uploading a new version of that session or something? I'm a little lost when it comes to PHP so bear with me!

MrPhil

You might try erasing your SMF cookies and changing the name SMF uses for cookies ($cookiename value in Settings.php). No promises, but it's worth a try. That's all I can think of, that some cookie/session related file on the server got into a weird permissions state.

Tikkuy

Quote from: MrPhil on February 24, 2013, 08:24:08 AM
You might try erasing your SMF cookies and changing the name SMF uses for cookies ($cookiename value in Settings.php). No promises, but it's worth a try. That's all I can think of, that some cookie/session related file on the server got into a weird permissions state.

So I tried both of those things and neither worked. I'm still waiting for a reply from my host. Any other ideas?

Tikkuy

Just an update:

I received a message back from my host today saying this: "The session path in your account was not set properly. Now, I have set it properly in php.ini file of your account. Could you please check the issue once again from your end?"

Unfortunately, the problem's still persisting but at least they tried!

MrPhil

You normally would not have to set a session path in your site's php.ini. Is there something you (or someone else) had added there (in php.ini) that might have affected the session path, before the latest troubles started? Can you tell what your host just added?

Tikkuy

Quote from: MrPhil on February 26, 2013, 02:02:43 PM
You normally would not have to set a session path in your site's php.ini. Is there something you (or someone else) had added there (in php.ini) that might have affected the session path, before the latest troubles started? Can you tell what your host just added?

I don't think I'd touched my session path let alone the php.ini file. Luckily my host has managed to fix the problem entirely and my site is up and running again! I asked them what they did to fix the website but they don't seem to want to reply for some reason. Thank you so so much to MrPhil and everyone else who helped me work this problem out - I was totally lost as to what to do!

kat

Quote from: Tikkuy on February 28, 2013, 02:39:39 AMI asked them what they did to fix the website but they don't seem to want to reply for some reason.

They boobed. ;)

Advertisement: