php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12720 An unnecessary extra slash
Submitted: 2001-08-13 12:04 UTC Modified: 2002-02-20 23:17 UTC
From: pulstar at mail dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.6 OS: Linux RedHat 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pulstar at mail dot com
New email:
PHP Version: OS:

 

 [2001-08-13 12:04 UTC] pulstar at mail dot com
<input type="hidden" name="PHPSESSID" value="28d352f895d1d14d2121e32d80a69299" />

When cookies are not available, PHP auto append the input above in each form of my page. My question is: why that slash is there in the end of the tag? It is making trouble in my site...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-13 12:09 UTC] swm@php.net
The extra slash is so that PHP is in compliance with XHTML
1.0. See http://www.w3.org/MarkUp/ for more information.

Also, if this is causing your applications problems, you
may be designing them incorrectly.
 [2002-02-20 22:53 UTC] teilo+php at teilo dot net
Is there no way to disable it though?  I could not find any.

Rough guess is that most people are still serving HTML 4.01 transitional pages or someother version of HTML.  This then breaks conformance for those pages.

Also PHP ignores the fact that you may already be sending this. eg if you have the following 
<FORM ... action="mydynpage.php?downloadID=a50d7195a107538e8043c4223e900a48"> php still adds the hidden input.
 [2002-02-20 23:17 UTC] torben@php.net
No, it's valid HTML all the way back to 2.0--it doesn't 
break HTML conformance at all. I suppose if you were 
desparate to get rid of it you could use output buffering
and run a regex replace over the buffer before you send it
to the browser.

I rather strongly suspect your problem is elsewhere.


Torben
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 06:01:30 2024 UTC