SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MY Session Variables Are Lost when i Use FRAMESET in Internet Explorer 6.0

    Hi all,

    I have a problem here with the use of iframe pointing to a file on another server.

    Here's is my problem explained on microsoft.
    http://support.microsoft.com/defaul...kb;en-us;323752

    I think it has to do with the use of different top-level domain names.

    Is there any way i can fix this with php?

    Grtz

  2. #2
    SitePoint Guru
    Join Date
    Jan 2001
    Location
    Alkmaar, Netherlands
    Posts
    710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what a suprise, I have the exactly same problem, and no solution so far. It is because default settings from IE 6.0

  3. #3
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm,

    Luckily i am not the only one then.

    So we are looking for something that holds our sessions cookies even if our top level domains are not equal.

  4. #4
    SitePoint Addict Chillijam's Avatar
    Join Date
    Nov 2003
    Location
    England
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *UNTESTED AND UNPROVEN*

    how about...

    PHP Code:
    echo "<iframe src=http://www.example.com/setmysession.php?PHPSESSID=" $_COOKIE['PHPSESSID'] . ">"
    to display your iframe, which contains the code....

    PHP Code:
    <?php
    setcookie
    (PHPSESSID,$_GET['PHPSESSID'];
    header("location: mycontentpage.php");
    ?>
    and display the content you want in mycontentpage.php, starting with SESSION_START()

    As I say, I haven't tested it, and this - and it would obviously depend on both domains running on the same server, with the same session handler config.

    Of course, you could always pass the whole set of required arguments in the url of the iframe source...
    Your mind is like a parachute. It works best when open.
    (HH The Dalai Lama)

  5. #5
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    would obviously depend on both domains running on the same server
    I my case the files are not on the same server. Worst the file i hav as src for my iframe is an asp file.

  6. #6
    SitePoint Guru D-flyer's Avatar
    Join Date
    Jan 2001
    Location
    Near a computer
    Posts
    782
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My code so far
    Code:
    $url = $_SERVER['HTTP_HOST'];
    $directory = explode(".",$url);
    //testing
    echo "dir is ".$directory[1];
    if (($_SERVER['HTTP_HOST']==www.$directory[1].com) AND ($directory[1] == "domain_name_i_want_to_bypass")) { 
    header("Location: http://www.domain_name_i_always_want_to_use.com/"); 
    }
    But this doesn't work?? Any tips

  7. #7
    SitePoint Addict Mower's Avatar
    Join Date
    Feb 2004
    Location
    Aussie Aussie Aussie
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok I am a noob, do no flaming

    could you use php to code the url in the iframe html code

    eg
    PHP Code:
    echo '<iframe src="www.url.com?.$sessionid />' 
    I know this code won't work, but you can work out what I am tring to do.

    and also could you pass the session variables through to the iframe with a form and post??
    \


    "Will I ever find my way to GURU?"

  8. #8
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I resolved a similar issue with session_name()

    I have noticed some strange behavior of IE 6.0 relating to session name
    when working on a customer site using PHP 4.3.4.

    When the session name is the default PHPSESSID, IE 6.0 (only)
    complains saying:

    Warning: session_start(): The session id contains invalid characters,
    valid characters are only az, AZ and 0-9 in ...

    On my demo site I had no such problems and the only difference I could
    find was the session_name that I had set there with session_name();

    If you do a Google on the warning, you'll find hundreds of matches.
    try
    http://www.google.com/search?q=The+s...ntains+invalid

    Am I paranoid? is this another MS conspiracy to thwart open source?
    I don't know.
    I do know that changing the session name resolved the problem!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •