1

My php session is to:

session.save_path = /var/lib/php/session

If i make a simple script to test like:

 session_start(); 
 $_SESSION['hi'] = 1; 
 var_dump($_SESSION);

Well the session is not working.

When I list the folder: "/var/lib/php/session" I see it is creating a new file everytime. So If I reload the page 1000 I will have 1000 session files.. Its losing the session and creating a new one.

So its has the permission to write to the file, but for some reason it is always creating a new session.

1 Answers1

2

I found my solution.

looks like the permission error was in the cookie folder "session.cookie_path" So.. the session folder is ok.. but since cookie was not ok, it didnt know the user session and created a new one all the time.