Advertisement:

Author Topic: Internal Server Problem  (Read 17488 times)

Offline GameKiwi

  • Newbie
  • *
  • Posts: 6
Internal Server Problem
« on: November 28, 2005, 05:35:37 PM »
Hi All

I recently installed RC1.1 so I am not sure if this is what has caused the problem or not.

Anyway, if you go to hxxp:www.gamekiwi.com/forum [nonactive] and try to click on Login or something in the main forum you get an internal Server Problem.  Now the problem is that for some reason it is putting in PHPSESSID= etc into the url.

If you press Ctrl F5 to force a refresh it disappears.

The question I have is, Help, how do I stop this from happening at all.

Thanks
« Last Edit: November 29, 2005, 02:35:56 PM by redone »

Offline Fizzy

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,676
  • Gender: Male
  • SMF World Domination
Re: Internal Server Problem
« Reply #1 on: November 28, 2005, 05:50:09 PM »
Hi

This sounds like a server issue.

Please have a look at Having problems with mod_security? and hopefully your host should be able to help resolve it :)

Cheers

Fizz
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Offline GameKiwi

  • Newbie
  • *
  • Posts: 6
Re: Internal Server Problem
« Reply #2 on: November 28, 2005, 06:23:40 PM »
well mod security isn't turned on so that isn't the problem.

any other ideas?

Offline Fizzy

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,676
  • Gender: Male
  • SMF World Domination
Re: Internal Server Problem
« Reply #3 on: November 29, 2005, 02:10:56 PM »
Has something changed?

I just tried the link again and now the forum is loading properly even with the PHPSESSID=

If you found a fix for the problem please feel free to share it for future members :)

Cheers

Fizz
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Internal Server Problem
« Reply #4 on: November 29, 2005, 02:33:41 PM »
I've seen this error numerous times. It's actually a bug in SMF, but only happens in certain situations depending on the PHP settings. If php is running in CGI mode and "session.use_trans_sid" is enabled in php.ini, SMF wants to put a ; after the PHPSESSID in the URL, and this causes problems for some reason. It seems that this has been fixed on your server, but here's the fix again for future reference:

There are two ways to fix this:

The first is to turn off the "session.use_trans_sid" option in php.ini by putting this at the beginning of index.php:

Code: [Select]
ini_set('session.use_trans_sid', 0);
That will make the server hide the session ID instead of displaying it in the URL for everyone to see (which can be a security risk in certain situations).

If that doesn't work for some reason, make the following change in Sources/QueryString.php

Find
Code: [Select]
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . ';', $buffer);
Replace
Code: [Select]
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . '&', $buffer);
This wouldn't be as much of an issue if hosts would stop enabling session.use_trans_sid and would stop running PHP in CGI mode :)
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org

Offline GameKiwi

  • Newbie
  • *
  • Posts: 6
Re: Internal Server Problem
« Reply #5 on: November 29, 2005, 02:37:47 PM »
Yes it seems to be working fine now.  What I did to fix it though I don't really know.  Sorry :)

Offline Fizzy

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,676
  • Gender: Male
  • SMF World Domination
Re: Internal Server Problem
« Reply #6 on: November 29, 2005, 04:56:17 PM »
Thanks for that Oldiesmann, that explains the extra ;
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Offline King RoRo

  • Semi-Newbie
  • *
  • Posts: 66
    • Best Syrian-Homsy Forum
Re: Internal Server Problem
« Reply #7 on: December 06, 2005, 06:10:16 AM »
Thanks for that Oldiesmann, that explains the extra ;


thanks .... thanks alot Oldiesmann.... u r my hero  ;)



God bless u
www.KingRoRo.com/smf
Best Syrian-Homsy Forum

Offline nikon

  • Newbie
  • *
  • Posts: 6
Re: Internal Server Problem
« Reply #8 on: December 09, 2005, 05:24:04 PM »
thanks alot Oldiesmann :D

i´ll fix this bug now...

Offline middenface

  • Newbie
  • *
  • Posts: 1
Re: Internal Server Problem
« Reply #9 on: April 13, 2007, 03:12:22 AM »
I know this is an old topic, but I was having the same "404 permission denied" problem and whilst [Unknown]'s solution did not work, this one seems to have been a good fix.

Nice one Oldiesmann :D

Offline thegto

  • Semi-Newbie
  • *
  • Posts: 25
Re: Internal Server Problem
« Reply #10 on: April 13, 2007, 03:52:57 AM »
Hi I got a 500 internal server error, when I login/logout/ member post ..guest nothing happen

my smf is version 1.1.1

can I resolve following as Oldiesmann advise ?

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: Internal Server Problem
« Reply #11 on: April 13, 2007, 04:17:13 AM »
can I resolve following as Oldiesmann advise ?

Give it a try. :)
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline thegto

  • Semi-Newbie
  • *
  • Posts: 25
Re: Internal Server Problem
« Reply #12 on: April 13, 2007, 11:43:31 AM »
from Oldiesmann
I put in the begining of index.php
Code: [Select]
ini_set('session.use_trans_sid', 0);
code I can't find
but I found something like this instead..
Code: [Select]
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . '&amp;', $buffer);


and I replace which this one
Code: [Select]
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . '&', $buffer);

I still got 500 internal error - this error I got when I login and logout and also when post something by using member id, webbrowser are loaded and stuck on the post page.

if I use guest post something, it work fine.

I use SMF1.1.1
Theme orange-IT ---> I change to default it still the same.
I install mod only  No Spam by Guests!
my webboard http://asian-movie.freehostia.com/webboard/index.php
if anyone'd like to test post
id : testmember
pass : test1234

please give me some advise ....  :'(
Thank you in advance
« Last Edit: April 13, 2007, 12:00:18 PM by thegto »

Offline Nica

  • Jr. Member
  • **
  • Posts: 103
    • A Public Secret
Re: Internal Server Problem
« Reply #13 on: July 02, 2008, 10:35:40 AM »
I've seen this error numerous times. It's actually a bug in SMF, but only happens in certain situations depending on the PHP settings. If php is running in CGI mode and "session.use_trans_sid" is enabled in php.ini, SMF wants to put a ; after the PHPSESSID in the URL, and this causes problems for some reason. It seems that this has been fixed on your server, but here's the fix again for future reference:

There are two ways to fix this:

The first is to turn off the "session.use_trans_sid" option in php.ini by putting this at the beginning of index.php:

Code: [Select]
ini_set('session.use_trans_sid', 0);That will make the server hide the session ID instead of displaying it in the URL for everyone to see (which can be a security risk in certain situations).

If that doesn't work for some reason, make the following change in Sources/QueryString.php

Find
Code: [Select]
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . ';', $buffer);
Replace
Code: [Select]
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . '&', $buffer);
This wouldn't be as much of an issue if hosts would stop enabling session.use_trans_sid and would stop running PHP in CGI mode :)

I am wondering sir, if this solution might apply to my problem. I receive the following error message whenever I try to view attachments or downloads or view photos from he gallery ( which I have now uninstalled) and when I try to edit or delete a profile comment.

Not Acceptable

An appropriate representation of the requested resource /MomMe/index.php could not be found on this server.
Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at mom-me-dearest.com Port 80

I tried disabling mod security via the .htaccess file. But the server apparently does not allow that as it cased the site not to load. I contacted the host and thus far received no help. They directed me back to SMF.

I know this is an old thread but I have made several posts on the community forum with mostly redirects to my host or to several tutorials that haven't helped yet. I don't mind reading them. I am learning a lot and finding it all interesting just not helpful as yet in this instance.

using: SMF 1.1.5 Default theme
Mods installed:
1.      Auto Embed Video/Audio Clips      3.0 
2.    Neat Board Layout    1.5    
3.    clickableImagebbcode    1.0    
4.    cbi, 1.0    1.0a    
5.    SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update    1.0    
6.    simplemp    2.1    
7.    Pm_Informer    1.0    
8.    Profile Music    1.0    
9.    Downloads System  1.0.4
All mods work fine except Downloads are not viewable, and profile comments not editable.

www.mom-me-dearest.com

Offline chilli

  • Newbie
  • *
  • Posts: 1
Re: Internal Server Problem
« Reply #14 on: November 20, 2008, 09:01:28 AM »
Wow!! Several years on from it's original posting and this thread STILL proves it's worth.

Such a small change with such big results. It worked perfectly for me - I'd never had this problem before so I guess it's just something wierd about my current hosts server settings.

Thank you so much Oldiesmann!!!