Common problem, but I'm stumped. Session variables are passing across pages on my local (localhost) deployment, but not on my (www) host. I use a common includes file for each page with this code:
$sessionDomain = "/";
@ini_set("session.cookie_path",$sessionDomain);
$sessionName = "ccSID".md5('/store/');
session_name($sessionName);
session_start();
I confirmed that the session ID cookie (ccSIDxxxxx...) remains the same across pages in my browser, but session variables don't seem to hold up when changing to a page in a different directory.
EDIT: My session cookie file has legible data from one path directory, but not another. I noticed that the good directory has a blank php.ini file in it. When I place a blank php.ini file in the bad directory, the session cookie becomes legible but then regular browser cookies don't save from pages in that directory. What's the deal with (blank) php.ini files in directories that change the behaviour of the session cookie?