Well, I thought I was in the clear, but my testing leaves a little something to desire. The system is placing the cookie, and the data seems to be legitimate, but it's no longer registering the login.
I replaced:
session_start();
with
// session settings:
$loginTime = 60*60*24*30; // 30 days
$sessDir = $_SERVER['DOCUMENT_ROOT'].'/sandbox/sessions';
// apply settings then start session
session_set_cookie_params($loginTime);
ini_set('session.gc_maxlifetime', $loginTime);
session_save_path($sessDir);
session_start();
I then logged in. The session storage directory gets a new file with the session id. The browser still gets a cookie issued and it's expiration is 30 days away(yay!)
However, my very simple authentication system is no longer registering the login and it loops right back to the index with the anonymous setting flagged.
I'm not sure where to go from here in regards to troubleshooting. The cookie is getting issued, but it no longer is respecting it.
Here's my authentication ifelse:
if(!session_is_registered('myusername')){
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
header("location:user.php?action=login");
}else{
echo("
logged in stuff");
}
This worked before the change in the change listed above. Do I need to alter my check to work with the new session setup?
thanks,
json