ASAAKI
03-09-2008, 03:07 PM
I've got a very simple session problem but can't seem to figure out what's wrong:
here's the index page:
<?php session_start();
if(!isset($_SESSION['uid']))
{
$_SESSION['uid'] = $username;
}
//some stuff below
?>
and on the next page:
<?php session_start();
var_dump($_SESSION);
?>
Simple as that. But on the next page $_SESSION is empty.
My php.ini has:
session.auto_start: Off
session.use_cookies: On
session.use_only_cookies: Off
session.use_trans_sid: 0
On my local machine this works fine, but on the server I'm developing (which has the same config in php.ini), variables just don't get passed on.
Is there something else I should be looking at? The only thing that strikes me as different from my local machine settings is that the server's running IIS. That can't be the problem but I can't think of anything else..
here's the index page:
<?php session_start();
if(!isset($_SESSION['uid']))
{
$_SESSION['uid'] = $username;
}
//some stuff below
?>
and on the next page:
<?php session_start();
var_dump($_SESSION);
?>
Simple as that. But on the next page $_SESSION is empty.
My php.ini has:
session.auto_start: Off
session.use_cookies: On
session.use_only_cookies: Off
session.use_trans_sid: 0
On my local machine this works fine, but on the server I'm developing (which has the same config in php.ini), variables just don't get passed on.
Is there something else I should be looking at? The only thing that strikes me as different from my local machine settings is that the server's running IIS. That can't be the problem but I can't think of anything else..