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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
32 - 3 = ?
Subscribe to this entry?

 
 [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: Mon Apr 29 19:01:30 2024 UTC