PHP: Managing Persistent Sessions

Go to class
Write Review

Free Online Course: PHP: Managing Persistent Sessions provided by LinkedIn Learning is a comprehensive online course, which lasts for 2-3 hours worth of material. The course is taught in English and is free of charge. Upon completion of the course, you can receive an e-certificate from LinkedIn Learning. PHP: Managing Persistent Sessions is taught by David Powers.

Overview
  • Learn how to store persistent PHP session data in a SQL server and create an auto-login system that recognizes returning users.

Syllabus
  • Introduction

    • Welcome
    • What you should know before watching this course
    • Using the exercise files
    • Sessions in Google Chrome
    1. Sessions and Security
    • How PHP sessions work
    • Configuring session
    • Changing session defaults
    • Inspecting how session data is stored
    • Implementing persistent sessions
    2. Preparing the Database
    • Creating a database and user account in MySQL
    • Defining tables to store session data
    • Connecting to the database
    3. Storing Session Data in MySQL
    • Implementing the PHP SessionHandlerInterface
    • Opening a session and reading stored data
    • Writing session data
    • Closing the session and garbage collection
    • Destroying the session
    • Setting the session handler
    4. Creating an Autologin System
    • How the autologin system works
    • Using a trait to define common properties
    • Extending the MysqlSessionHandler class
    • Creating a persistent login
    • Checking a returning visitor's credentials
    • Logging out
    5. Testing the Autologin System
    • Generating a unique key when registering users
    • Using a PSR-4 class autoloader
    • Authenticating the user
    • Revalidating credentials for sensitive areas
    • Logging out selectively
    Conclusion
    • Final thoughts