PHP Programming Basics Practice Test: Session Handling — Flashcards | PHP & Programming | FatSkills

PHP Programming Basics Practice Test: Session Handling — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

PHP manages sessions by storing session variables in files on disk. The session ID is used as part of the filename. PHP allows user-defined handlers to be written that change how sessions are managed. 
Start your PHP script with session_start()
The session_start() function either creates a new session, if one does not exist, or it continues an existing session
The session creates a temporary file that stores various session variables and their values
The session ID is stored in a cookie within the user's browser
The cookie is called PHPSESSID by default
The session is destroyed when you close the website
The file is available to all the pages of the website to access information about the user
You need to set the path for this file using the session.save_path setting from the php.ini file 

The SessionHandler class in PHP exposes the current internal PHP session save handler. 

1 of 20 Ready
Which one of the following is the very first task executed by a session enabled page?
Check whether a valid session exists
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password