RE: [PHP] --enable-trans-sid and HTML 4.01 compliance
| From: | Jon Haworth | Date: | Fri, 12 Oct 2001 14:54:31 +0000 |
| Subject: | RE: [PHP] --enable-trans-sid and HTML 4.01 compliance | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-70931@lists.php.net to get a copy of this message | ||
Have a look in your php.ini file, under the "Data Handling" section. You
should find a line
;arg_separator.output = "&"
uncomment this line and all should be well
Cheers
Jon
-----Original Message-----
From: Matthew Leingang [mailto:leingang@math.rutgers.edu]
Sent: 12 October 2001 13:36
To: php-general@lists.php.net
Subject: [PHP] --enable-trans-sid and HTML 4.01 compliance
Hi,
I am interested in making my PHP pages HTML 4.01 transitional compliant.
One of the conditions for this is that all ampersands in the document be
the beginning of entity references. This includes those embedded in the
query strings of links:
BAD http://www.php.net/?foo=bar&bar=baz
GOOD http://www.php.net/?foo=bar&bar=baz
My problem is that I am using sessions and would like to keep the
functionality of --enable-trans-sid. This adds the session name and ID to
certain URLs in the page. But it does it with '&' in the non-HTML4 way.
There doesn't seem to be a way to change the separating character that PHP
uses to append session name and ID to the url, either by configure
directive, .htaccess, or on-the-fly. Or is there? What other ways can I
get around this? I tried output buffering the whole page and fixing the
naked ampersands with a regexp, but it seems like the url adapting is done
between the true end of the script and the output to the browser.
Another solution: turn trans-sid off and roll my own, output buffering
and adding session name and ID to all important urls manually, using the
"right" sepchar. This seems redundant and slow.
Anyone tried to get around this before? I found some PHP sites that
boasted HTML 4.01 compliance, but when I ran them through validator.w3.org
they had the same problem I did.
Or is it that older browsers don't understand & in the url, and PHP
wants maximum compatibility rather than maximum compliance?
Rock on,
Matt
**********************************************************************
'The information included in this Email is of a confidential nature and is
intended only for the addressee. If you are not the intended addressee,
any disclosure, copying or distribution by you is prohibited and may be
unlawful. Disclosure to any party other than the addressee, whether
inadvertent or otherwise is not intended to waive privilege or confidentiality'
**********************************************************************