1
Koreus
Disable PHPSESSID for anonymous visitors
  • 2004/4/21 12:12

  • Koreus

  • Just popping in

  • Posts: 29

  • Since: 2003/2/9 2


Hiya,

I don't want to initialize session when my visitors are just anonymous.
Because if they don't accept cookies the PHPSESSID appears in URL.
For example if google is visiting my web site he won't follow my url because there are PHPSESSID in it.

I think I have to hack the /include/common.php and play with "sesssion_start()" but perhaps it has been done before ?

Someone has some tips ? Is it ok to remove session for anonymous ?

Thanks in advance.

2
Herko
Re: Disable PHPSESSID for anonymous visitors
  • 2004/4/21 12:30

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


This is the first time I hear Google is having problems indexing a XOOPS site. I have heard reports of the contrary, that XOOPS and Google seem to like eachother a lot... Google likes xoops.org a lot, at least, as it spiders us a lot (2gb worth, monthly!)

Herko

3
Koreus
Re: Disable PHPSESSID for anonymous visitors
  • 2004/4/21 21:45

  • Koreus

  • Just popping in

  • Posts: 29

  • Since: 2003/2/9 2


It is because you don't have any PHPSESSID in your URLs

Check your phpinfo() and normally you should have this parameter session.use_trans_sid off

My host doesn't give me the choice and this parameter is ON.
So when someone, which doesnt accept cookies, surf on my site he has PHPSESSID in URL

And that's bad for sipder.

I tried to look at common.php and I have no idea how I can disable it :/
Is Session used for anonymous (visitor not logged) ?

Thanks in advance


4
Rick
Re: Disable PHPSESSID for anonymous visitors
  • 2004/4/27 0:03

  • Rick

  • Just popping in

  • Posts: 4

  • Since: 2002/2/3 1


Koreus,

Thank you for your information. You seem to have identified the cause of my problem - the phpsessionid showing up in the URL's - not good for Google at all! It turns out the server I'm on did have session.use_trans_sid to on - and I was able to turn it off.

After looking around, it appears if you do not have access to your php.ini file, you can turn it off with a few options. The easiest appears to be adding the following line to your .htaccess file

php_value session.use_trans_sid Off


And in PHP code:

ini_set('session.use_trans_sid'false);


I hope that works for you!

5
Koreus
Re: Disable PHPSESSID for anonymous visitors
  • 2004/4/28 20:44

  • Koreus

  • Just popping in

  • Posts: 29

  • Since: 2003/2/9 2


Nope it doesn't work for me.
I can't disable session.use_trans_sid with my host.

So I'm using another solution, I put this line :
ini_set('url_rewriter.tags','');

after the session_start and now no more PHPSESSID in URL

Login

Who's Online

224 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 224


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits