Connecting Tech Pros Worldwide Help | Site Map

HTML Validation Errors - Sessions

  #1  
Old July 17th, 2005, 02:30 PM
StevePBurgess@gmail.com
Guest
 
Posts: n/a
I am trying to validate my website coding using the W3.ORG markup
validator.

Although there are some problems I am able to solve -I am getting lots
of these messages:

"Line 39, column 35: cannot generate system identifier for general
entity "PHPSESSID"

<a
href="printerfriendly.php?pn=1&PHPSESSID=1fa03d252 f4998f205c34b67f45873ee">"

This is because PHP is inserting session variables using & rather than
&amp;. I have searched the net for a solution - and have identified one
or two that I can't seem to get to work.

Can someone suggest a definitive solution. I do not have full access to
the server (shared hosting).

Many thanks.

  #2  
Old July 17th, 2005, 02:30 PM
Alvaro G Vicario
Guest
 
Posts: n/a

re: HTML Validation Errors - Sessions


*** StevePBurgess@gmail.com wrote/escribió (7 Jun 2005 02:30:01 -0700):[color=blue]
> <a
> href="printerfriendly.php?pn=1&PHPSESSID=1fa03d252 f4998f205c34b67f45873ee">"
>
> This is because PHP is inserting session variables using & rather than
> &amp;. I have searched the net for a solution - and have identified one
> or two that I can't seem to get to work.[/color]

Edit arg_separator.output in php.ini:

arg_separator.output = "&amp;"

BTW, and it's merely a matter of opinion, I don't think it's a good idea to
send session ids in URLs. That way they end up in bookmarks, forwarded
address, etc.

[color=blue]
> Can someone suggest a definitive solution. I do not have full access to
> the server (shared hosting).[/color]

Oops... :)
Then try ini_set(), maybe you're allowed to change it per-script.


--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
  #3  
Old July 17th, 2005, 02:30 PM
StevePBurgess@gmail.com
Guest
 
Posts: n/a

re: HTML Validation Errors - Sessions


>>I am trying to validate my website coding using the W3.ORG markup
validator. I am getting lots of these messages:[color=blue][color=green]
>>"Line 39, column 35: cannot generate system identifier for general[/color][/color]
entity "PHPSESSID"[color=blue][color=green]
>> Can someone suggest a definitive solution . I do not have full access to
>> the server (shared hosting).[/color][/color]
[color=blue]
>Oops... :)
>Then try ini_set(), maybe you're allowed to change it per-script.[/color]


I am using cookies for sessions. PHP is adding the PHPSESSID
automatically when it can't find a cookie. I would prefer it not to do
this.

I do not have access to the php.ini file. I have tried inserting:

ini_set('session.use_trans_sid', 0);

at the top of every page that using sessions before the
session_start(); command.

  #4  
Old July 17th, 2005, 02:30 PM
StevePBurgess@gmail.com
Guest
 
Posts: n/a

re: HTML Validation Errors - Sessions


>do not have access to the php.ini file. I have tried inserting:

[color=blue]
>ini_set('session.use_trans_sid*', 0);[/color]

[color=blue]
>at the top of every page that using sessions before the
>session_start(); command.[/color]


I have added

"php_value arg_separator.output &amp;"

to my .htaccess file which hasn't stopped the session variables being
added by has ensured they are added with &amp; not just &.

  #5  
Old July 17th, 2005, 02:30 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a

re: HTML Validation Errors - Sessions


StevePBurgess@gmail.com wrote:
<snip>[color=blue]
> I am using cookies for sessions. PHP is adding the PHPSESSID
> automatically when it can't find a cookie. I would prefer it not to do
> this.
>
> I do not have access to the php.ini file. I have tried inserting:
>
> ini_set('session.use_trans_sid', 0);[/color]
<snip>

<news:1111603962.594721.154710@l41g2000cwc.googleg roups.com> or
<http://groups-beta.google.com/group/comp.lang.php/browse_frm/thread/aca375b24bf4e50c/ce24f27f2b7ac610#ce24f27f2b7ac610>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom html validation in VS2005 =?Utf-8?B?ZGlzY2lwbGluZTRldmVyNjY2?= answers 1 October 8th, 2008 04:25 AM
Fixing HTML Validation Errors jimrich answers 7 June 29th, 2007 10:23 PM
disabling html validation does not seem to stck Nalaka answers 12 January 18th, 2006 02:15 AM
Constraint validation errors Sudip Chakraborty answers 2 November 11th, 2005 11:08 PM
Validation Errors: CJM answers 3 July 20th, 2005 05:29 PM