xyn Posted February 19, 2007 Share Posted February 19, 2007 Hey, I'm just wondering why i keep getting random strings liek this... "?PHPSESSID=80c61156c21da1f7a39f431ca591fd68" And is there anyway of "removing it" or hiding them? Link to comment https://forums.phpfreaks.com/topic/39130-solved-sessions/ Share on other sites More sharing options...
skali Posted February 19, 2007 Share Posted February 19, 2007 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 More sharing options...
xyn Posted February 19, 2007 Author Share Posted February 19, 2007 And Sessions would still work? Link to comment https://forums.phpfreaks.com/topic/39130-solved-sessions/#findComment-188461 Share on other sites More sharing options...
The_Assistant Posted February 19, 2007 Share Posted February 19, 2007 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 More sharing options...
xyn Posted February 19, 2007 Author Share Posted February 19, 2007 mmk, thanks guys I just wasn't sure. Link to comment https://forums.phpfreaks.com/topic/39130-solved-sessions/#findComment-188468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.