Pass $_SESSION to iframe

Open to all! Ask other shopowners for help.
Post Reply
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Pass $_SESSION to iframe

Post by LeeFoster »

My Phoenix site is anything but your typical shop and I now have a need to pass session variables to an iframe that loads another page.

I've read it can be fixed by adding

Code: Select all

ini_set('session.cookie_samesite', 'None');
      @ession_set_cookie_params(['samesite' => 'None', 'secure' => true]);
before session_start() only that doesn't exist as such.

I'm using CE Phoenix v1.0.8.5 if that's important


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Pass $_SESSION to iframe

Post by ecartz »

Look in the catalog/includes/configure.php file for https://github.com/CE-PhoenixCart/Phoen ... p#L25..L30

Code: Select all

  define('COOKIE_OPTIONS', [
    'lifetime' => 0,
    'domain' => '',
    'path' => '',
    'samesite' => 'Lax',
  ]);
You may have to add the secure line, but you can just edit the samesite.
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Re: Pass $_SESSION to iframe

Post by LeeFoster »

ecartz wrote: Thu Jan 06, 2022 2:33 pm Look in the catalog/includes/configure.php file for https://github.com/CE-PhoenixCart/Phoen ... p#L25..L30

Code: Select all

  define('COOKIE_OPTIONS', [
    'lifetime' => 0,
    'domain' => '',
    'path' => '',
    'samesite' => 'Lax',
  ]);
You may have to add the secure line, but you can just edit the samesite.
Nope that didn't work. It may be the code in general though not your solution.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply