---
title: "What is a Session?"  
description: "What is a Session?"  
author: "Anonymous User"  
published: 2011-03-18  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/474/what-is-a-session  
category: "php"  
tags: ["php"]  
reading_time: 2 minutes  

---

# What is a Session?

## session

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests.

An alternative way to make data accessible across the various pages of an entire website is to use a PHP Session.

A session creates a file in a temporary directory on the server where registered session variables and their values are stored. This data will be available to all pages on the site during that visit.

The location of the temporary file is determined by a setting in the php.ini file called session.save_path. Bore using any session variable make sure you have setup this path.

## Answers

### Answer by Anonymous User

## session

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests.

An alternative way to make data accessible across the various pages of an entire website is to use a PHP Session.

A session creates a file in a temporary directory on the server where registered session variables and their values are stored. This data will be available to all pages on the site during that visit.

The location of the temporary file is determined by a setting in the php.ini file called session.save_path. Bore using any session variable make sure you have setup this path.


---

Original Source: https://www.mindstick.com/interview/474/what-is-a-session

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
