Page 1 of 1

Session initialization issue

Posted: Fri Jul 04, 2008 10:05 am
by miro_igov
Hello,

I wonder if someone have experience with starting a session in another browser with an ID of a valid session. I am trying to implement SWFUpload on a server and because flash have it's own cookie container i need to pass the session ID to it so it can start the same session as in the browser and use the session variables. This works ok on some servers, but not on others. Example:

st1.php

Code: Select all

 
<?php
    session_start();
    $_SESSION['test'] = 'QWERTY';
    
    echo session_id();
?>
 
st2.php

Code: Select all

 
<?php
    session_id($_GET['sid']);
    
    session_start();
    
    print_r($_SESSION);
?>
 
st2.php is called by http://domain.com/st2.php?sid=5344e919b ... f317becdfc , the id of the session is obtained from the echo in st1.php

The problem is that running st1.php and http://domain.com/st2.php?sid=5344e919b ... f317becdfc in same browser (FireFox) works ok and in the 2nd file i am able to see the session. But if i run http://domain.com/st2.php?sid=5344e919b ... f317becdfc in IE session is empty. Again this works fine in some servers (IE displays the session content from the 2nd file), and on other servers the session is empty.

Is there a php.ini config variable that deals here?

Re: Session initialization issue

Posted: Wed Jul 09, 2008 4:57 pm
by Benjamin
Without looking too deep it looks fine to me. Have you verified that sid is populated and correct on st2.php? Your files are all on the same box right?