Adding to Apache access log from PHP
| From: | Geoff Caplan | Date: | Tue, 03 Dec 2002 14:13:22 +0000 |
| Subject: | Adding to Apache access log from PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-129061@lists.php.net to get a copy of this message | ||
Hi folks,
I would like to add a few fields to a custom Apache access log format
and populate the values from mod_php.
As a mechanism, I was thinking of using the PHP function putenv( ) to
set environmental variables. I am assuming that these would be in the
same request namespace used by Apache?
Then in Apache, I would use the mod_log_config directive documented
as:
"%...{FOOBAR}e: The contents of the environment variable FOOBAR"
to place the value of the variables in the log string.
Is this a sensible approach? I only have a live server to test on, so
I'd like to be sure I am on the right track b
--
Geoff Caplan
Advantae Ltd
mailto:geoff@advantae.com
http://www.advantae.com