What are the security implications of storing session data in the /tmp directory on a server?

Storing session data in the /tmp directory on a server can pose security risks as the data may be accessible to other users or processes on the server. To mitigate this risk, it is recommended to store session data in a directory that is only accessible to the web server user.

// Set custom session save path to a directory only accessible to the web server user
session_save_path('/path/to/custom/session/directory');