Advertisement

07.25.2005 at 07:42AM PDT, ID: 21503212
[x]
Attachment Details

Problem setting cookies

Asked by Sagron in PHP Scripting Language

Tags: abyss, cookie, expires, setting

Okay, I am running some php software on 2 different machines. One is running Windows XP and the other is running Windows 2000. The software works fine on the XP machine, but has problems with cookies on the 2000 one. It seems that cookies aren't being created at all. Any idea what would cause this problem? I'm using the newest version of PHP and the Abyss Web Server X1 on both machines with the php-cgi interpreter.
--------------------------------------------------------------------------------------------------------------------------------------------------
Note: On the 2000 machine I also ran the cookie tester I found here: http://www.chipchapin.com/WebTools/cookietest.php?source=true
The tests were:
1:    header("Set-Cookie: testcookie1=present;");
2:    header("Set-Cookie: testcookie2=present; expires=$date");
3:    header("Set-Cookie: testcookie3=present; expires=$date; path=/");
4:    setcookie("testcookie4", "present");
5:    setcookie("testcookie5", "present", (time()+6400));
  Removed -- 6:    setcookie("testcookie6", "present", "(time()+6400)");
7:    setcookie("testcookie7", "present", (time()+6400), "/", "$HTTP_HOST");
  Removed -- 8:    setcookie("testcookie8", "present", "(time()+6400)", "/", "$HTTP_HOST");
9:    print "<meta http-equiv=\"Set-Cookie\" content=\"testcookie9=present\">\n";
10:   print "<meta http-equiv=\"Set-Cookie\" content=\"testcookie10=present; expires=$date\">\n";
11:   print "<meta http-equiv=\"Set-Cookie\" content=\"testcookie11=present; expires=$date; path=/\">\n";
12:   print "<script>document.cookie = 'testcookie12' + '=' + 'present';</script>\n";
13:   header("Set-Cookie: testcookie13=present; path=/; domain=$HTTP_HOST; expires=".gmstrftime("%A, %d-%b-%Y %H:%M:%S GMT",time()+9600));
--------------------------------------------------------------------------------------------------------------------------------------------------
and the results were:
Method 1: Fail
Method 2: Fail
Method 3: Fail
Method 4: OK
Method 5: OK
Method 7: Fail
Method 9: OK
Method 10: OK
Method 11: OK
Method 12: OK
Method 13: FailStart Free Trial
[+][-]07.25.2005 at 08:23AM PDT, ID: 14518498

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.25.2005 at 08:43AM PDT, ID: 14518635

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.25.2005 at 08:48AM PDT, ID: 14518678

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.25.2005 at 10:02AM PDT, ID: 14519578

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.25.2005 at 01:27PM PDT, ID: 14521553

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP Scripting Language
Tags: abyss, cookie, expires, setting
Sign Up Now!
Solution Provided By: seemilesrun
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.26.2005 at 07:39AM PDT, ID: 14527569

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.26.2005 at 07:53AM PDT, ID: 14527699

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32