News:

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

Main Menu

Internal Server Problem

Started by GameKiwi, November 28, 2005, 05:35:37 PM

Previous topic - Next topic

GameKiwi

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

Fizzy

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.


GameKiwi

well mod security isn't turned on so that isn't the problem.

any other ideas?

Fizzy

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.


Oldiesmann

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:

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
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . ';', $buffer);

Replace
$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
Christian Metal Fans

GameKiwi

Yes it seems to be working fine now.  What I did to fix it though I don't really know.  Sorry :)

Fizzy

Thanks for that Oldiesmann, that explains the extra ;
"Reality is merely an illusion, albeit a very persistent one." - A.E.


King RoRo

Quote from: Fizzy on November 29, 2005, 04:56:17 PM
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

nikon

thanks alot Oldiesmann :D

i´ll fix this bug now...

middenface

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

thegto

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 ?

Sarge


    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

thegto

#12
from Oldiesmann
I put in the begining of index.php
ini_set('session.use_trans_sid', 0);

code I can't find
but I found something like this instead..

$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . '&amp;', $buffer);



and I replace which this one

$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

Nica

Quote from: Oldiesmann 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:

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
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')(\?)?/', '"' . $scripturl . '?' . SID . ';', $buffer);

Replace
$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

chilli

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!!!

Advertisement: