cookies appearing in browser

This is a discussion on cookies appearing in browser within the PHP Language forums, part of the PHP Programming Forums category; Hi! I have a php website that is showing cookies on screen instead of processing them. When I do a '...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-03-2003
Mark Ennis
 
Posts: n/a
Default 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=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948
Set-Cookie: detection=detected
Content-type: text/html

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

Any ideas?

Thanks,
/Mark
Reply With Quote
  #2 (permalink)  
Old 10-03-2003
Andy Hassall
 
Posts: n/a
Default Re: cookies appearing in browser

On 3 Oct 2003 11:38:18 -0700, ennism@yahoo.co.uk (Mark Ennis) wrote:

>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=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948
>Set-Cookie: detection=detected
>Content-type: text/html
>
><html>
><head>
><title> </title>
>:
>:
>---
>
>Any ideas?


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)
Reply With Quote
  #3 (permalink)  
Old 10-04-2003
Duane Phillips
 
Posts: n/a
Default Re: cookies appearing in browser


"Mark Ennis" <ennism@yahoo.co.uk> wrote in message
news:69610068.0310031038.7dba5f0d@posting.google.c om...
> 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=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948
> Set-Cookie: detection=detected
> Content-type: text/html
>
> <html>
> <head>
> <title> </title>
> :
> :
> ---
>
> Any ideas?
>
> Thanks,
> /Mark



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

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

HTH

~Duane Phillips.


Reply With Quote
  #4 (permalink)  
Old 10-04-2003
Duane Phillips
 
Posts: n/a
Default Re: cookies appearing in browser

"Duane Phillips" <askme@askme.askme> wrote in message
news:F6rfb.32486$%h1.22599@sccrnsc02...
>
> "Mark Ennis" <ennism@yahoo.co.uk> wrote in message
> news:69610068.0310031038.7dba5f0d@posting.google.c om...
> > 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=VxvJ987SdY5AaGzRp9U5UlZTLFc8Tpdz1065 291948
> > Set-Cookie: detection=detected
> > Content-type: text/html
> >
> > <html>
> > <head>
> > <title> </title>
> > :
> > :
> > ---
> >
> > Any ideas?
> >
> > Thanks,
> > /Mark

>
>
> SetCookie ("lp0", "$lp0", time()+90000);
> SetCookie ("lp1", "$lp1", time()+90000);
>
> Args: value, var name, expiration
> works for me...
>
> HTH
>
> ~Duane Phillips.
>
>


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

~Duane Phillips.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:04 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0