Phpsessid

software development

#1

hi,

on my DH site when I start a new session in IE using session_start(); all my links are surfixed with ?PHPSESSID=.

It’s only doing it in IE for whatever reason but the thing is if I refresh the page they all go away and my session remains active just how it does on FF and Safari but with the ?PHPSESSID added to any of my links.

Does anyone know of a way to stop IE putting ?PHPSESSID after all my links the first time it loads the page?


#2

[quote]
on my DH site when I start a new session in IE using session_start(); all my links are surfixed with ?PHPSESSID=.[/quote]
Cookie troubles. Somewhere along your travels IE has gotten flaky with cookies, either in its native security setup or via some sort of security add-on/toolbar and it’s not setting the cookie on the initial load. Reset the security so your URL is a “trusted” site and/or remove any add-on/toolbar software.

Basically, I wouldn’t worry too much about it if I was you. The average IE user (…based on the fact they use IE for anything other than MS Windows Update downloads) isn’t really very concerned with what appears in the URL indicator anyways.


#3

ok i have a similar problem. what happens is that when i try going to www.w3.org/validator to validate my website, that validator puts in ?SESSID=232qdasdasd at the end of my links, this doesnt happen if i view the page directly from a browser?


#4

That’s what’s supposed to happen because the w3c validator doesn’t accept cookies. If PHP sees that it can’t detect its session cookie when “start_session” is called, it will tag the URL with the session ID request variable. It should not have any effect on the validator unless your script depends on cookies somehow and will spit out invalid HTML code as a result of the missing cookie/session info.

I myself use a combination of the “get_browser()” function (which requires an externally available php_browscap.ini file and a mofication to your site’s php.ini file) along with a page reload to detect cookie/session handling availability. It’s tricky but not un-doable and it handles pretty much everything except for people that have their browsers set un uber-anal-retentive mode.


#5

I also got the trouble with PHPSESSID, it troubles some of my users.

When they type in my site: http://www.wucaiclub.com (chinese site), IE will append PHPSESSID to the URL and shows Error 503,

Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.