the PHPSESSID variable that holds the session id is not being saved into the client cookie.
This results in a new session id being generated every time I call the ses
It is not used for Yoav's case, but maybe used for other people who got similar issue:
don't forget to call session_start()
It sounds like session_start() would create the PHPSESSID and save it in cookie if it's not sent from client cookie.
from php.net
When a visitor accesses your site, PHP will check automatically (if session.auto_start is set to 1) or on your request (explicitly through session_start()) whether a specific session id has been sent with the request. If this is the case, the prior saved environment is recreated.
some good examples about session_start() http://php.net/manual/en/function.session-start.php