non è che magari hai le register globals a on?

Se si, un'operazione cosi:

$role = '';

andrebbe a sovrascrivere anche $_SESSION['role']

ciao