Jump to content

[SOLVED] Sessions


xyn

Recommended Posts

This is not a problem of your code but is actually the setting in the php.ini of the server where your application is hosted.

 

You can prevent it from happening by creating a php.ini file in your root folder with these two lines.

 

session.use_trans_sid=0

session.use_only_cookies=1

 

This will disable the session id in the url and cookies will be used instead for session handling.

 

If this is not allowed by your host then you can create a .htacces file with following values:

 

php_value session.use_trans_sid 0

php_value session.use_only_cookies 1

 

Cheers...

Link to comment
https://forums.phpfreaks.com/topic/39130-solved-sessions/#findComment-188458
Share on other sites

As skali said it's not a problem with your code. Whenever a user looks at your website the server automatically generates an id number used to identify this session. With some setups the session id is passed from page to page by adding it to the end of your URL. Some scripts (such as IPB) make use of this feature when generating their own session id's so you can actually use it for some good on your site. Otherwise just ignore it, it doesn't hurt.

 

And yes, sessions will still work fine if you add skali's code.

Link to comment
https://forums.phpfreaks.com/topic/39130-solved-sessions/#findComment-188467
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.