It depends on the method that the server uses to store session data. I think that there can be several ways to store as a database, files on the server, memcache server. therefore you must use the correct path.
Anyway, I did web programming in just 5 months. so i'm not sure what i said.
Yongnam jeong
source share