4

I got that simple script on server1

<iframe src="https://server2/index.php" width=800 height=800>

and on server2

index.php

    <?php session_start();
    $_SESSION['test'] = 'test';
    ?>
   <body>
         <a href="index2.php">Go !</a>
   </body>

index2.php

<?php session_start();
print_r($_SESSION);

and... result is empty:

Is there a 'simple' way to allow sessions on iframes ? I tried with

ini_set("session.use_cookies","0");

Same issue. The only way I found so far is to pass the sessionid parameter between pages which is very complex (I have to rewritten many pages, change a lot of scripts, change ajax calls..)

Is there a quicker round around for that ?

yarek
  • 11,278
  • 30
  • 120
  • 219

0 Answers0