php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11492 Cookie function being parsed by PHP
Submitted: 2001-06-14 14:05 UTC Modified: 2001-07-22 13:15 UTC
From: afeks at mediaafeks dot com Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.5 OS: freeBSD 4.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: afeks at mediaafeks dot com
New email:
PHP Version: OS:

 

 [2001-06-14 14:05 UTC] afeks at mediaafeks dot com
I wanted to point out something for the parsing of a setcookie function in PHP on Apache/FreeBSD.

If I set a cookie with no attributes like:

setcookie("cookietype", "chocolateChip");

It seems to work fine I can place it before the headers and call it after I select a link. Your function list on the quickref page states that setcookie is involved in the NS cookie standard format.

i.e. int setcookie("cookie_name", "cookie_value", expire_time, "location", "url", security);

When I set a cookie as:

setcookie("cookieType", "oatmealRaisen", time()+45000, "/",
".foo.com");

It will not show up or even set. I cleared all of my cookies and accessed the page. My script sets the cookie before the header information and then I click a link to a test page that calls the cookie and tries to echo the value. No value, check my cookies folder and no cookie. Do I need to modify the cookie function in PHP source to work on freeBSD or is it missong some special module that parses cookies responsibly.


--Jimmy

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-14 14:50 UTC] sniper@php.net
Works for me just fine with NS 4.77 and IE 5.5.
Try leaving the domain out. And if that helps,
then check what the domain in url is when you 
access the page..ie. if you access it with url:

http://localhost/cookie.php

it wont work.

--Jani

 [2001-06-14 16:24 UTC] afeks at mediaafeks dot com
I left the domain out and it is still the same issue. It seems to be only in when I issue a expiration time into the the cookie. Could the problem be that I use an IP address instead of a domain. Could it be that I installed the DSO version of PHP? I am so lost on why one version of the setcookie would work and soon as I add one attribute it fails. Also sessions are not being envoked as well. I am reading each line of the ini file and all seems to be well. Their is DNS attached to the IP but no domain name. I also tried to set a javascript cookie with an expiration time and it worked fine. It was sceduled to expire in 10 minutes and it worked perfect. Is there some work around for this?
 [2001-06-19 09:44 UTC] sniper@php.net
Could you add a complete but short example script that
doesn't work into this report? Also, does it happen
with ALL browsers? Or only with some specific ones?

--Jani

 [2001-07-22 13:15 UTC] andy@php.net
no feedback after 30+ days.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 23 17:01:26 2019 UTC