PHP Session Problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

When I use Session in my php code, the first time a session is
establish, every link on that page (where the session starts)
contains the PHPSESSID in the query.

For example:

If we follow the link, the PHPSESSID disapears, which makes sence to me
because the ID was added as a "cookie" to the browser and there is no
need to continue to be in the URL.

My question is, can I avoid this? (because of search engines)

I have tried in 3 different hosts and it happens in all of them. Except
in my localhost machine, don't know the reason why.

Can someone help me?

Here is the code. Just paste it in a file named session.php

print "<html><a href=\"session.php\">Test the problem</a></html>";


Re: PHP Session Problem

Fred wrote [edited]:
Quoted text here. Click to load it


Quoted text here. Click to load it

Try one or both of these:

  ini_set('session.use_trans_sid', '0');
  ini_set('session.use_only_cookies', '1');

Quoted text here. Click to load it

Mail to my "From:" address is readable by all at /
== ** ## !! ------------------------------------------------ !! ## ** ==
may bypass my spam filter. If it does, I may reply from another address!

Re: PHP Session Problem

Dear Pedro,

I have tried your sugestion.

It works on PHP Version 4.2.3 but NOT on the recent Version 4.3.9.
Bad luck for me, because what I want is in Version 4.3.9
Any other ideas? :(

Thank you,

Re: PHP Session Problem


So, I tried with ini_set("url_rewriter.tags",""); and it worked. , this page has it all.

Thanks for the help anyway. Could not have done it without you.

Site Timeline