Session Handlers in PHP

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

DR. HARI SINGH GOUR UNIVERSITY SAGAR(M.P.

Department Of Computer Science And Application

Presentation on – session handler

Submitted to Submitted by
Er. K.Kant Sir Vivek
Y22271041
Session Handlers in PHP
Understanding Different
Approaches to Session Management
1 Introduction to Session Management
Overview of session handling techniques

2 Common Session Handling Techniques


Exploring various common session management methods

3 Built-in Session Handlers


Overview and characteristics of four built-in PHP session handlers
Files, Memcached, Redis, Custom
Session Handling
Files Memcached Redis Custom (User-
defined
File-based session Exploring session Utilizing Redis for Functions)
handling and its use handling using session management
cases Memcached Implementing custom
handlers for specific
use cases
Characteristics and Use Cases of Each
Handler

1 Files 2 Memcached
Characteristic 1 and use case Characteristic 1 and use case

3 Redis 4 Custom (User-defined Functions)


Characteristic 1 and use case Characteristic 1 and use case
Session Handler Comparison
Handler Use Cases Characteristics

Files Case 1, Case 2 Characteristic 1, Characteristic


2

Memcached Case 3, Case 4 Characteristic 1, Characteristic


2

Redis Case 5, Case 6 Characteristic 1, Characteristic


2

Custom (User-defined Case 7, Case 8 Characteristic 1, Characteristic


Functions) 2
Conclusion and Best Practices
Key Considerations Best Practices
Summary of essential points to consider Recommendations for effective session
management
1. Which one of the following is the very first task executed by a
session enabled page?
a) Delete the previous session
b) Start a new session
c) Check whether a valid session exists
d) Handle the session
Answer :c

2. How many ways can a session data be stored?


a) 3
b) 4
c) 5
d) 6
Answer: b

3. Which directive determines how the session information will


be stored?
a) save_data
b) session.save
c) session.save_data
d) session.save_handler
Answer : d
4. Which one of the following is the default PHP session name?
a) PHPSESSID
b) PHPSESID
c) PHPSESSIONID
d) PHPIDSESS
Answer : a

5. If session.use_cookie is set to 0, this results in use of _____________


a) Session
b) Cookie
c) URL rewriting
d) Nothing happens
Answer : c
REFERENCE
1.https://chat.openai.com/

2.https
://stackoverflow.com/questions/76894813/custo
m-session-handler-with-json-in-php-destroy-sessi
on-by-mistake

3https
://www.sitepoint.com/writing-custom-session-ha
ndlers
THANK YOU

You might also like