You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andrew Quayle <an...@aquayle.co.uk> on 2003/12/13 23:20:30 UTC

[users@httpd] mod_usertrack, WindowsXp & cookies

Apache, by default doesn't send cookies (so the docs say) - How do I change
it to send cookies. I am running WindowsXP and don't know what file to
change.

Quote from Apache Docs:-
When the user track module is compiled in, and "CookieTracking on" is set,
Apache will start sending a user-tracking cookie for all new requests. This
directive can be used to turn this behavior on or off on a per-server or
per-directory basis. By default, compiling mod_usertrack will not activate
cookies.

So - how do I turn on cookies please??
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.543 / Virus Database: 337 - Release Date: 21/11/2003


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] mod_usertrack, WindowsXp & cookies

Posted by Joshua Slive <jo...@slive.ca>.
On Sun, 14 Dec 2003, Andrew Quayle wrote:

> I edited httpd.conf , changed theses lines:-
>
> LoadModule usertrack_module modules/mod_usertrack.so
> CookieTracking On
> CookieName Apache
>
>
> used a new script:-
>
> <?php  /* file: tstcookie.php */
> $value = 'something from somewhere';
>
> setcookie ("TestCookie", $value);
> setcookie ("TestCookie", $value,time()+3600);  /* expire in 1 hour */
> setcookie ("TestCookie", $value,time()+3600, "/", ".localhost.com", 1);
> /* or */
> setcookie ("TestCookie", $value,time()+3600, "/", "127.0.0.1", 1);
> /* or */
> setcookie ("TestCookie", $value,time()+3600, "/", "192.168.0.101", 1);
>
> ?>
>
> Still the server doesn't send out a cookie - there are no entries in the
> error.log file
> Any clues please?

I should have guessed.  You do NOT want mod_usertrack.  It sends a
particular cookie that is really only useful for log-session tracking.  If
you are generating your own cookies using php, you should not have
mod_usertrack.

Now, the question remains why your php cookies aren't working.  This is
not really an apache issue, and I'm not a php expert, but a few things to
check:

1. Make absolutely sure there is no other output before your setcookie.

2. Make sure that your php script is actually being interpreted as a php
script.

3. Make sure that your method to test if the cookie is really being sent
is correct.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] mod_usertrack, WindowsXp & cookies

Posted by Andrew Quayle <an...@aquayle.co.uk>.
I edited httpd.conf , changed theses lines:-

LoadModule usertrack_module modules/mod_usertrack.so
CookieTracking On
CookieName Apache


used a new script:-

<?php  /* file: tstcookie.php */
$value = 'something from somewhere';

setcookie ("TestCookie", $value);
setcookie ("TestCookie", $value,time()+3600);  /* expire in 1 hour */
setcookie ("TestCookie", $value,time()+3600, "/", ".localhost.com", 1);
/* or */
setcookie ("TestCookie", $value,time()+3600, "/", "127.0.0.1", 1);
/* or */
setcookie ("TestCookie", $value,time()+3600, "/", "192.168.0.101", 1);

?>

Still the server doesn't send out a cookie - there are no entries in the
error.log file
Any clues please?
Andy


-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: 13 December 2003 23:03
To: users@httpd.apache.org
Subject: Re: [users@httpd] mod_usertrack, WindowsXp & cookies



On Sat, 13 Dec 2003, Andrew Quayle wrote:

> Apache, by default doesn't send cookies (so the docs say) - How do I
change
> it to send cookies. I am running WindowsXP and don't know what file to
> change.
>
> Quote from Apache Docs:-
> When the user track module is compiled in, and "CookieTracking on" is set,
> Apache will start sending a user-tracking cookie for all new requests.
This
> directive can be used to turn this behavior on or off on a per-server or
> per-directory basis. By default, compiling mod_usertrack will not activate
> cookies.
>
> So - how do I turn on cookies please??

The crucial file is httpd.conf.

You likely need to make two changes to this file:

1. There should be a line that begins with LoadModule that references
mod_usertrack.  You need to uncomment this to enable mod_usertrack.

2. You need to add the line "CookieTracking On".  Adding it to the end of
the file should be sufficient.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.543 / Virus Database: 337 - Release Date: 21/11/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.543 / Virus Database: 337 - Release Date: 21/11/2003


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_usertrack, WindowsXp & cookies

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, 13 Dec 2003, Andrew Quayle wrote:

> Apache, by default doesn't send cookies (so the docs say) - How do I change
> it to send cookies. I am running WindowsXP and don't know what file to
> change.
>
> Quote from Apache Docs:-
> When the user track module is compiled in, and "CookieTracking on" is set,
> Apache will start sending a user-tracking cookie for all new requests. This
> directive can be used to turn this behavior on or off on a per-server or
> per-directory basis. By default, compiling mod_usertrack will not activate
> cookies.
>
> So - how do I turn on cookies please??

The crucial file is httpd.conf.

You likely need to make two changes to this file:

1. There should be a line that begins with LoadModule that references
mod_usertrack.  You need to uncomment this to enable mod_usertrack.

2. You need to add the line "CookieTracking On".  Adding it to the end of
the file should be sufficient.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org