Connecting Tech Pros Worldwide Help | Site Map

HTML Validation Errors - Sessions

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 01:30 PM
StevePBurgess@gmail.com
Guest
 
Posts: n/a
Default HTML Validation Errors - Sessions

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, 01:30 PM
Alvaro G Vicario
Guest
 
Posts: n/a
Default 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, 01:30 PM
StevePBurgess@gmail.com
Guest
 
Posts: n/a
Default 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, 01:30 PM
StevePBurgess@gmail.com
Guest
 
Posts: n/a
Default 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, 01:30 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.