PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Sun Nov 06, 2005 12:52 pm
Is there anyway to put a session variable into an apache access log? I would like to log the Ip address, the referer, the date, all that stuff, and the user's session id.
m3mn0n
PHP Evangelist
Posts: 3548 Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada
Post
by m3mn0n » Sun Nov 06, 2005 2:14 pm
Are you on a shared host or is this for an environment that you have complete root access to?
And why not use your own log file? You could easily create a SesInfoLog.log file and place the variables there.
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Sun Nov 06, 2005 2:15 pm
virtual server - i have root access
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Nov 06, 2005 5:27 pm
may want to look into the
error_log() function..
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Sun Nov 06, 2005 6:22 pm
I mean the access logs, not the error logs - like when apache logs the ip address, filename, status code, etc - it would show the $_SESSION var
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Nov 06, 2005 6:43 pm
you're going to need to build it on your own then, separate from Apache's logs...
timvw
DevNet Master
Posts: 4897 Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium
Post
by timvw » Sun Nov 06, 2005 7:30 pm
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Sun Nov 06, 2005 9:09 pm
dont have access :-\