473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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
Jul 17 '05 #1
3 2137
On 3 Oct 2003 11:38:18 -0700, en****@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 (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #2

"Mark Ennis" <en****@yahoo.co.uk> wrote in message
news:69**************************@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.
Jul 17 '05 #3
"Duane Phillips" <as***@askme.askme> wrote in message
news:F6rfb.32486$%h1.22599@sccrnsc02...

"Mark Ennis" <en****@yahoo.co.uk> wrote in message
news:69**************************@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.
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TG | last post by:
This is more of a pain than I thought it would be. I need a simple code segment to determine whether a browser accepts cookies or not. When I pass variables between pages when cookies are turned...
20
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
2
by: Amit D.Shinde | last post by:
Hello Experts.. I need some help regarding cookies and session objects and also global.asa file I am creating one cookie when a user logs in on my website. The cookie stores the login name of...
4
by: Rickey Tom | last post by:
This has to be a very common question, but my search did not come up with an answer. I needed to set an expiration time for a cookie. In .NET, is seems that the server-side code is used to set...
4
by: Greg Livengood | last post by:
I need to test my ASP.net web application for the case that the client browser doesn't support cookies or for the case that cookies are turned off on the client browswer. What is odd is that when...
1
by: Peter Row | last post by:
Hi, I have a web app, there is only really 1 aspx page (that the user never sees) the rest of the code is done in a DLL that implements HttpHandler. My app (which is a porting job from Vb6...
16
by: Cheung, Jeffrey Jing-Yen | last post by:
I have a windows form application that generates a request, downloads an image, and waits the user to enter in login info. Unfortunately, this image is dynamic and based on session data. I have...
7
by: Marcus | last post by:
I know that when you start a session in PHP, the "cookie" it creates is not the same as those that are stored in your browser's temp folder, and instead is kept in RAM. I am confused because in...
0
by: dawson | last post by:
I started off by trying to use the HttpCapabilitiesBase.Cookies Property (Note: This property is new in the .NET Framework version 2.0) however it kept on returning true even when I disabled...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.