In the Apache log configuration it is possible to specify that the HTTP auth user name should be logged. Most PHP scripts have their own, cookie-based authentication. Is it possible in PHP to provide Apache with a HTTP auth username for logging purposes, even if the authentication is cookie-based? If yes, how would the code look like? If not, what are alternatives?
Share
Apache passes data between modules in notes. If you run PHP as an Apache module, you can use
apache_note()to get and set notes. You can then include the%{note_name}nlog format string to write this to the access log. This will not “leak” any data back to the client.In PHP:
In your server configuration: