[nycphp-talk] PHP session id's in access logs
Andrew Yochum
andrew at digitalpulp.com
Wed Jul 2 13:26:10 EDT 2003
On Wed, Jul 02, 2003 at 01:12:22PM -0400, Andrew Yochum wrote:
[...]
> Are you trying to log that session ID if using cookie-based sessions?
>
> Here's an example from my httpd.conf file for the log format that includes
> cookies:
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" combinedcookie
> ...which simply adds \"%{Cookie}i\" to log the stock combined log format.
> You'll get all cookies stored by your site, but at least you have the session
> ID there for use.
>
> Andrew
I should also mention that if you're using Apache 2.0, you can log a specific
cookie value with %{cookiename}C ... See:
http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#formats
Andrew
--
Andrew Yochum
Digital Pulp, Inc.
212.679.0676x255
andrew at digitalpulp.com
More information about the talk
mailing list