httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Burden" <...@burden.ca>
Subject Re: [users@httpd] custom apache logs
Date Thu, 01 Jul 2004 18:23:55 GMT
This is probably not useful if you need the information in standard
access_log format (for stats tools or whatever), but have you looked into
PHP's error_log() function?
http://www.php.net/manual/en/function.error-log.php

Alternatively you might try replacing %u with \"%{UserName}C\" in your
custom log directive

http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#formats

Also look into PHP's putenv()
http://www.php.net/manual/en/function.putenv.php

I've never tried this, but you might be able to just go ahead and change the
PHP_AUTH_USER variable without actually using it for anything (except
logging).

----- Original Message ----- 
From: "Jim Maul" <jmaul@elih.org>
To: "Apache Mailing List" <users@httpd.apache.org>
Sent: Thursday, July 01, 2004 1:25 PM
Subject: [users@httpd] custom apache logs


> I have read through the custom logs section of the apache documentation
but i
> have been unable to determine if what i want to do is possible.
>
> When using PHP auth with apache _SERVER['PHP_AUTH_USER'] used to get
logged to
> apache's access log.  We have since switched to authenticating through a
form
> and then using php sessions and have gotten rid of all instances of
> PHP_AUTH_USER.  Because of this, the currently logged in user is no longer
> logged to the apache access log.  Is there any way to have PHP variables
> recorded in the apache access log?  The currently logged in user is stored
in
> _SESSION['UserName'].  Can i somehow write this to apache's log?
>
> Any help is appreciated greatly.
>
> Thanks,
>
> Jim
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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


Mime
View raw message