I found this article which said to add this code to my functions.php and now the code in my footer is working fine.

http://devondev.com/2012/02/03/using-the-php-session-in-wordpress/

add_action('init', 'myStartSession', 1);
add_action('wp_logout', 'myEndSession');
add_action('wp_login', 'myEndSession');

function myStartSession() {
    if(!session_id()) {
        session_start();
    }
}

function myEndSession() {
    session_destroy ();
}


Get REQUEST_URI and don't overwrite
I have an S4 with the latest software update (though this has been a problem for a long time before too). And when I am in a group text with Iphone users, it seems that my outgoing texts get stuck in limbo until all of theirs is through.  Sometimes several minutes, so I am always behind in the conversation.  Is there a fix?
