This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 852 - &PHPSESSID in urls
Summary: &PHPSESSID in urls
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.7.0
Hardware: All other
: P1 critical
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-31 14:42 UTC by Venimus
Modified: 2005-01-22 15:24 UTC (History)
0 users

See Also:


Attachments

Description Venimus 2004-08-31 14:42:37 UTC
PHP automatically adds &PHPSESSID at the end of the url's if cookies are not 
supported. This prevents sites from validating. While this doesn't appear on 
normal browser it does for the validator page. I think &PHPSESSID should be 
ignored while parsing.
Comment 1 David Dorward 2004-08-31 15:38:03 UTC
It is an error in the markup and, as such, should not be ignored.

PHP adds query string variables to URLs in documents when sessions are enabled.
By default it generates code that is invalid under every version of (X)HTML. The
PHP manual describes how to configure the system to use correctly escaped
ampersands (although it only mentions XHTML).

This should be considered a bug in PHP (as it is used in the default configuration).
Comment 2 Venimus 2004-08-31 21:44:08 UTC
Of course it can be reconfigured. But how do you suggest escaping when the 
configuration file is not accessible (while it usualy isn't)?
Comment 3 Olivier Thereaux 2004-08-31 22:58:23 UTC
Don't shoot the messenger... 

If PHP generates, by default, broken markup and most people cannot change this (wrong) setting, PHP 
is broken and should be fixed.

This has nothing to do with the validator.

In other words, your question about "how to escape when the configuration file is not accessible" would 
be best asked to the php developers, not here. 
Comment 4 Cool Dude 2k 2005-01-22 15:24:11 UTC
ini_set("arg_separator.output","&");(In reply to comment #0)
> PHP automatically adds &PHPSESSID at the end of the url's if cookies are not 
> supported. This prevents sites from validating. While this doesn't appear on 
> normal browser it does for the validator page. I think &PHPSESSID should be 
> ignored while parsing.

ini_set("arg_separator.output","&");
I use this and it fixs it for me.