Connecting Tech Pros Worldwide Help | Site Map

Session Info Added to URL

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 12:30 AM
Celebrate
Guest
 
Posts: n/a
Default Session Info Added to URL

I'm noticing that when my homepage first starts up, all the menu links
to other pages have the session info appended to the URL. For example:

href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"

This is done automatically as the original URL that I coded does not
have the session information added to it.

My first question is, is this normal behavior? The reason I'm
concerned is I have been tracking the Google Bot's activity on our
site and it hits the homepage and does not crawl the other pages. I'm
concerned the added session info is throwing it off.

Should I be concerned and if so, is there a way of preventing it from
appending the session info? I don't have the option of removing the
session_start() from the page because I must test for a session
variable.

Any help on this would be greatly appreciated...

Paul

  #2  
Old July 17th, 2005, 12:31 AM
Geoff Berrow
Guest
 
Posts: n/a
Default Re: Session Info Added to URL

I noticed that Message-ID:
<8bafcced.0310122018.878f0e@posting.google.com> from Celebrate contained
the following:
[color=blue]
>Should I be concerned and if so, is there a way of preventing it from
>appending the session info? I don't have the option of removing the
>session_start() from the page because I must test for a session
>variable.[/color]
The way I understand this is that there are two ways of passing the
session info. One is by setting a cookie and the other is by storing
the session variables on the server and then accessing them via a
session id.

Your security settings are probably preventing cookies being set, hence
the addition of the ID (someone please correct me if I've got this
wrong)
--
Geoff Berrow
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
  #3  
Old July 17th, 2005, 12:31 AM
Jean-Baptiste Nizet
Guest
 
Posts: n/a
Default Re: Session Info Added to URL

Celebrate wrote:[color=blue]
> I'm noticing that when my homepage first starts up, all the menu links
> to other pages have the session info appended to the URL. For example:
>
> href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"
>
> This is done automatically as the original URL that I coded does not
> have the session information added to it.
>
> My first question is, is this normal behavior? The reason I'm
> concerned is I have been tracking the Google Bot's activity on our
> site and it hits the homepage and does not crawl the other pages. I'm
> concerned the added session info is throwing it off.
>[/color]

Yes, it's normal. The first time the session is started, PHP doesn't
know if you support cookies or not. So it sends you a session cookie and
it also rewrites the URL. The second time, PHP receives the cookie, and
thus stops rewriting URLs.
The solution for google is to start the session only when it's
necessary. I think it's also possible to change php.ini in order to only
use cookies for sessions. But if you do that, all the visitors who
deactivate cookies won't be able to use your web site.

JB.
[color=blue]
> Should I be concerned and if so, is there a way of preventing it from
> appending the session info? I don't have the option of removing the
> session_start() from the page because I must test for a session
> variable.
>
> Any help on this would be greatly appreciated...
>
> Paul[/color]

  #4  
Old July 17th, 2005, 12:31 AM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
Default Re: Session Info Added to URL

pleury@celebrate-software.com (Celebrate) wrote in message news:<8bafcced.0310122018.878f0e@posting.google.co m>...[color=blue]
> I'm noticing that when my homepage first starts up, all the menu links
> to other pages have the session info appended to the URL. For example:
>
> href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"
>
> This is done automatically as the original URL that I coded does not
> have the session information added to it.
>
> My first question is, is this normal behavior? The reason I'm
> concerned is I have been tracking the Google Bot's activity on our
> site and it hits the homepage and does not crawl the other pages. I'm
> concerned the added session info is throwing it off.[/color]

It's because in you PHP.ini file, you have session.use_trans_sid
= 1. See http://cvs.php.net/co.php/php-src/php.ini-dist
[color=blue]
>
> Should I be concerned[/color]

Not much except for security reasons. Look at your ini file's
session section for more stuff.

---
"US got a nuclear bomb that can destroy the world 13 times. Russia
got a nuclear bomb that can destroy the world 7 times. But...my
friend! Tell me! CAN YOU KILL A MAN TWICE??!!!!!" -- P.A.Sangma, Peace
loving Indian politician against India's step to go for a nuclear
test.
Email: rrjanbiah-at-Y!com
  #5  
Old July 17th, 2005, 12:35 AM
Celebrate
Guest
 
Posts: n/a
Default Re: Session Info Added to URL

ng4rrjanbiah@rediffmail.com (R. Rajesh Jeba Anbiah) wrote in message news:<abc4d8b8.0310130427.1b6541de@posting.google. com>...[color=blue]
> pleury@celebrate-software.com (Celebrate) wrote in message news:<8bafcced.0310122018.878f0e@posting.google.co m>...[color=green]
> > I'm noticing that when my homepage first starts up, all the menu links
> > to other pages have the session info appended to the URL. For example:
> >
> > href="products/product_list.php?PHPSESSID=45759f8aadee64cff2db657 48977ac67"
> >
> > This is done automatically as the original URL that I coded does not
> > have the session information added to it.
> >
> > My first question is, is this normal behavior? The reason I'm
> > concerned is I have been tracking the Google Bot's activity on our
> > site and it hits the homepage and does not crawl the other pages. I'm
> > concerned the added session info is throwing it off.[/color]
>
> It's because in you PHP.ini file, you have session.use_trans_sid
> = 1. See http://cvs.php.net/co.php/php-src/php.ini-dist
>[color=green]
> >
> > Should I be concerned[/color]
>
> Not much except for security reasons. Look at your ini file's
> session section for more stuff.
>
> ---
> "US got a nuclear bomb that can destroy the world 13 times. Russia
> got a nuclear bomb that can destroy the world 7 times. But...my
> friend! Tell me! CAN YOU KILL A MAN TWICE??!!!!!" -- P.A.Sangma, Peace
> loving Indian politician against India's step to go for a nuclear
> test.
> Email: rrjanbiah-at-Y!com[/color]

Thanks for the help guys.

Paul
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.