Location for session files in Apache/PHP

The default session.save_path is set to "" which will evaluate to your system’s temp directory. See this comment at https://bugs.php.net/bug.php?id=26757 stating:

The new default for save_path in upcoming releaess (sic) will be the empty string, which causes the temporary directory to be probed.

You can use sys_get_temp_dir to return the directory path used for temporary files

To find the current session save path, you can use

  • session_save_path() — Get and/or set the current session save path

Refer to this answer to find out what the temp path is when this function returns an empty string.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)