php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12941 &PHPSESSID appended to links causes invalud html.
Submitted: 2001-08-24 04:43 UTC Modified: 2001-08-25 07:44 UTC
From: loopyfx at yahoo dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.0.5 OS: Windows 2000 Adv Server
Private report: No CVE-ID: None
 [2001-08-24 04:43 UTC] loopyfx at yahoo dot com
URI: http://loopy.2y.net/main.php 
Server: Microsoft-IIS/5.0 
Character encoding: unknown 
Document type: HTML 4.01 Transitional 
Below are the results of attempting to parse this document with an SGML parser. 

Line 24, column 154: 
  ... >*<a href="/programming/projects.asp?type=current&PHPSESSID=64076887e5 ...
                                                        ^
Error: unknown entity "PHPSESSID" (explanation...)


All you need to do is make "&PHPSESSID" be "&amp;PHPSESSID" (that is the html entity for & in the changed one, if it doesn't show up.)  Thanks.
-Harlan

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-24 06:02 UTC] sniper@php.net
Use this php.ini directive:

arg_separator.output = "&amp;"


 [2001-08-24 22:01 UTC] loopyfx at yahoo dot com
I tried doing that, but it does the same thing still.

Copied out of c:\winnt\php.ini:
arg_separator.output = "&amp;"
 [2001-08-25 07:44 UTC] sniper@php.net
Well, are you sure the php.ini file is even used by PHP?
ie. is it on the right directory?
This does work. At least on PHP 4.0.6 which you should
be using too..

 [2002-01-17 05:14 UTC] barends at linuxnewbie dot nl
I have the same problem with 4.0.6 (on apache and Linux).
I did add the:

arg_separator.output = "&amp;"

rule to php.ini, but it still uses & instead of &amp; :(
 [2004-05-23 02:24 UTC] lbruno at republico dot estv dot ipv dot pt dot invalid
Around here, it DOES work, you nay-sayers!

It's 4.2.3 on RH9, btw. The PHP was hand-rolled, so there are no patches from the vendor.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC