• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

htpasswd logging or script to log

imported_KuJaX

Platinum Member
Hello Everyone!

I have a .htpasswd setup with username:encryptedpassword format. Simply put, if someone tries to access members_only.php then it will immediately prompt them for their username and password (which i manually put into the .htpasswd and e-mailed to them).

I would like to log each and everytime someone logs in, into a log file. For example, if I gave out usernames "johndoe" and "janedoe" to two different people, and "johndoe" logs in today at 10:00am then the log would look something like this:


johndoe 8/3/2006 10:00am


Lets say 5 minutes later "janedoe" logs into the page. The log file would then look like this:


johndoe 8/3/2006 10:00am
janedoe 8/3/2006 10:05am


and then if johndoe logs in a week later (with no one logging in in that week's time)


johndoe 8/3/2006 10:00am
janedoe 8/3/2006 10:05am
johndoe 8/10/2006 10:00am


I hope you understand what I am after. If someone can provide some assistance on having a log file of each time a username logs in, that would be absolutely fantastic and would be greatly appreciated. Thanks,
 
the only way i know how is to switch to a session based system and a user database and a log database

although your appache logs probably show the ht logins, you could probably write a script to filter them out of the server log
 
Originally posted by: troytime
the only way i know how is to switch to a session based system and a user database and a log database

although your appache logs probably show the ht logins, you could probably write a script to filter them out of the server log

Yeah I believe that the apache logs do grab this, but I don't know how or where to look for a script to filter out the server log.

Any specific session based system and user database that is simple and can do what I need (and free!) 🙂
 
Back
Top