session.save_path

INIINI default value changed in 8.5

Session: session.save_path — Argument passed to save_handler. In the case of files, this is the path where data files are stored. Note: Windows users have to change this variable in order to use PHP's session functions. The path can be defined as: session.save_path = "N;/path" where N is an integer. Instead of storing all the session files in /path, what this will do is use subdirectories N-levels deep, and store the session data in those directories. This is useful if your OS has problems with many files in one directory, and is a more efficient layout for servers that handle many sessions. NOTE 1: PHP will not create this directory structure automatically. You can use the script in the ext/session dir for that purpose. NOTE 2: See the section on garbage collection below if you choose to use subdirectories for session storage The file storage module creates files using mode 600 by default. You can change that by using session.save_path = "N;MODE;/path" where MODE is the octal representation of the mode. Note that this does not overwrite the process's umask.

Default value empty
Development value ""
Production value ""

Modifiability: INI_ALL - The session.save_path INI directive can be configured anywhere, including php.ini files, ini_set calls, Apache .htaccess files, per-directory .ini files, etc.

PHP 5
PHP 7
PHP 8.0
PHP 8.1-8.2
PHP 8.3
PHP 8.4
PHP 8.5
Changed
PHP 8.6
[Session]
session.save_path = 

Changes to the session.save_path INI

PHP 8.5

  • INI directive default value changed from /var/lib/php/sessions to ``

PHP 5.6

  • INI directive default value changed from ` to/var/lib/php/sessions`

session.save_path INI Availability

PHP VersionAvailability
PHP 8.6Future Release Yes
PHP 8.5Upcoming Release Yes
PHP 8.4Supported (Latest) Yes
PHP 8.3Supported Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Security-Fixes Only Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes