News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[Solved] Trans ID or what? Session-ID in forum url

Started by Tjati, May 29, 2011, 03:25:31 AM

Previous topic - Next topic

Tjati

Hi there,

I wrote my own Feed-Script. I use there the following output:
http://localhost/index.php/topic,1337.msg51234.html#msg5123

The script includes of course the SSI.php. The output is absolutly right if the viewer of the feed is logged in. But IF I am not, then the created output is like:
http://localhost/index.php?PHPSESSID=761fm6kl8o8u1ien9i3v4mqip6&/topic,1337.msg51234.html#msg5123

I am absolutly unsure why. The PHP setting use_trans_sid is disabled an never enabled in the simple machines forum script (i searched all files with notepad++ for trans). Why are the URLs changed? I want to disable this behaviour.

Thanks a lot.


Okay, problem solved. Changed in Sources/Load.php the following lines:
function loadSession()
{
global $HTTP_SESSION_VARS, $modSettings, $boardurl, $sc;

// Attempt to change a few PHP settings.
@ini_set('session.use_cookies', true);
@ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
@ini_set('session.use_trans_sid', false);
@ini_set('arg_separator.output', '&');


to

function loadSession()
{
global $HTTP_SESSION_VARS, $modSettings, $boardurl, $sc;

// Attempt to change a few PHP settings.
@ini_set('session.use_cookies', true);
// @ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
// @ini_set('session.use_trans_sid', false);
@ini_set('arg_separator.output', '&');

Advertisement: