HTML Validation Errors - Sessions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • StevePBurgess@gmail.com

    #1

    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="printerfr iendly.php?pn=1 &PHPSESSID=1fa0 3d252f4998f205c 34b67f45873ee"> "

    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.

  • Alvaro G Vicario

    #2
    Re: HTML Validation Errors - Sessions

    *** StevePBurgess@g mail.com wrote/escribió (7 Jun 2005 02:30:01 -0700):[color=blue]
    > <a
    > href="printerfr iendly.php?pn=1 &PHPSESSID=1fa0 3d252f4998f205c 34b67f45873ee"> "
    >
    > 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.o utput in php.ini:

    arg_separator.o utput = "&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
    --

    Comment

    • StevePBurgess@gmail.com

      #3
      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('sessio n.use_trans_sid ', 0);

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

      Comment

      • StevePBurgess@gmail.com

        #4
        Re: HTML Validation Errors - Sessions

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

        [color=blue]
        >ini_set('sessi on.use_trans_si d­', 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.o utput &amp;"

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

        Comment

        • R. Rajesh Jeba Anbiah

          #5
          Re: HTML Validation Errors - Sessions

          StevePBurgess@g mail.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('sessio n.use_trans_sid ', 0);[/color]
          <snip>

          <news:111160396 2.594721.154710 @l41g2000cwc.go oglegroups.com> or
          <http://groups-beta.google.com/group/comp.lang.php/browse_frm/thread/aca375b24bf4e50 c/ce24f27f2b7ac61 0#ce24f27f2b7ac 610>

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

          Comment

          Working...