MySQL / htaccess authentication with login timestamping

Posted on 2011-05-10
Last Modified: 2012-06-21
Currently our site runs MySQL autentication to get in. This is via htaccess/MySQL auth. (LAMP based system).

I'm trying to think of a way to timestamp a successful login onto the site. Mainly via logging the successful authentication time into the login Table.

Any ideas on how to approach this would be appreciated.
Question by:kiwistag
    LVL 32

    Assisted Solution

    You could modify mod_auth_mysql to log anything you need.
    LVL 107

    Accepted Solution

    You might be able to adapt this design.

    The adaptation would write the client identity and the DATETIME values into a log table.  This would happen in the registration script near line 33 and in the login script near line 26.

    HTH, ~Ray
    LVL 6

    Author Comment

    Thanks, I'll look at these & see how I go :)

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now