だから私はPHPセッションを管理するために取り組んでいるクラスを持っています、これがクラスです:
class SessionManagement {
    public static function sessionStarted() {
        if(session_id() == '') {
            return false;
        } else {
            return true;
        }
    }
    public static function sessionExists($session) {
        if(sessionStarted() == false) {
            session_start();
        }
        if(isset($_SESSION[$session])) {
            return true;
        } else {
            return false;
        }
    }
    public static function setSession($session, $value) {
        if(sessionStarted() != true) {
            session_start();
        }
        $_SESSION[$session] = $value;
        if(sessionExists($session) == false) {
            throw new Exception('Unable to Create Session');
        }
    }
    public static function getSession($session) {
        if(isset($_SESSION[$session])) {
            return $_SESSION[$session];
        } else {
            throw new Exception('Session Does Not Exist');
        }
    }
}
今これを試して...
try {
    SessionManagement::setSession('Foo', 'Bar');
    echo SessionManagement::sessionStarted();
    echo SessionManagement::getSession('Foo');
    echo SessionManagement::sessionExists('Foo');
} catch(Exception $e) {
    echo $e->getMessage();
}
...出力が生成されません...ここでどこを壊しているのかわかりません...役立つ目があれば大歓迎です...