cookies appearing in browser

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Ennis

    cookies appearing in browser

    Hi!

    I have a php website that is showing cookies on screen instead of
    processing them. When I do a 'view source' I get the following:

    ---
    Set-Cookie: newsflashcookie =OA%3D%3D
    Set-Cookie: sessioncookie=V xvJ987SdY5AaGzR p9U5UlZTLFc8Tpd z1065291948
    Set-Cookie: detection=detec ted
    Content-type: text/html

    <html>
    <head>
    <title> </title>
    :
    :
    ---

    Any ideas?

    Thanks,
    /Mark
  • Andy Hassall

    #2
    Re: cookies appearing in browser

    On 3 Oct 2003 11:38:18 -0700, ennism@yahoo.co .uk (Mark Ennis) wrote:
    [color=blue]
    >I have a php website that is showing cookies on screen instead of
    >processing them. When I do a 'view source' I get the following:
    >
    >---
    >Set-Cookie: newsflashcookie =OA%3D%3D
    >Set-Cookie: sessioncookie=V xvJ987SdY5AaGzR p9U5UlZTLFc8Tpd z1065291948
    >Set-Cookie: detection=detec ted
    >Content-type: text/html
    >
    ><html>
    ><head>
    ><title> </title>
    >:
    >:
    >---
    >
    >Any ideas?[/color]

    Source code demonstrating the problem?

    Usually this sort of thing is caught by PHP and it raises "Warning: Cannot
    modify header information - headers already sent".

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    • Duane Phillips

      #3
      Re: cookies appearing in browser


      "Mark Ennis" <ennism@yahoo.c o.uk> wrote in message
      news:69610068.0 310031038.7dba5 f0d@posting.goo gle.com...[color=blue]
      > Hi!
      >
      > I have a php website that is showing cookies on screen instead of
      > processing them. When I do a 'view source' I get the following:
      >
      > ---
      > Set-Cookie: newsflashcookie =OA%3D%3D
      > Set-Cookie: sessioncookie=V xvJ987SdY5AaGzR p9U5UlZTLFc8Tpd z1065291948
      > Set-Cookie: detection=detec ted
      > Content-type: text/html
      >
      > <html>
      > <head>
      > <title> </title>
      > :
      > :
      > ---
      >
      > Any ideas?
      >
      > Thanks,
      > /Mark[/color]


      SetCookie ("lp0", "$lp0", time()+90000);
      SetCookie ("lp1", "$lp1", time()+90000);

      Args: value, var name, expiration
      works for me...

      HTH

      ~Duane Phillips.


      Comment

      • Duane Phillips

        #4
        Re: cookies appearing in browser

        "Duane Phillips" <askme@askme.as kme> wrote in message
        news:F6rfb.3248 6$%h1.22599@scc rnsc02...[color=blue]
        >
        > "Mark Ennis" <ennism@yahoo.c o.uk> wrote in message
        > news:69610068.0 310031038.7dba5 f0d@posting.goo gle.com...[color=green]
        > > Hi!
        > >
        > > I have a php website that is showing cookies on screen instead of
        > > processing them. When I do a 'view source' I get the following:
        > >
        > > ---
        > > Set-Cookie: newsflashcookie =OA%3D%3D
        > > Set-Cookie: sessioncookie=V xvJ987SdY5AaGzR p9U5UlZTLFc8Tpd z1065291948
        > > Set-Cookie: detection=detec ted
        > > Content-type: text/html
        > >
        > > <html>
        > > <head>
        > > <title> </title>
        > > :
        > > :
        > > ---
        > >
        > > Any ideas?
        > >
        > > Thanks,
        > > /Mark[/color]
        >
        >
        > SetCookie ("lp0", "$lp0", time()+90000);
        > SetCookie ("lp1", "$lp1", time()+90000);
        >
        > Args: value, var name, expiration
        > works for me...
        >
        > HTH
        >
        > ~Duane Phillips.
        >
        >[/color]

        Additionally, a SetCookie needs to be done before any headers or other
        output to the browser is sent.

        ~Duane Phillips.


        Comment

        Working...