Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Chrome samesite issue


Guest

Recommended Posts

I need to update my site, running PHP 5.6.31, to allow SameSite=None; Secure, but I'm having difficulty, as my PHP version is outdated. (I'd love to update, but I just do not have the skillset for that task).

I found on the following link https://github.com/GoogleChromeLabs/samesite-examples/blob/master/php.md
that the below is the recommended code to accomplish the task, but it does not mention which file that I should place it in, or where. 

// Set a same-site cookie for first-party contexts
header('Set-Cookie: cookie1=value1; SameSite=Lax', false);
// Set a cross-site cookie for third-party contexts
header('Set-Cookie: cookie2=value2; SameSite=None; Secure', false);

Any help with this issue would be appreciated, as I'm still a novice when working within this system.

Thank you in advance!

Link to comment
Share on other sites

23 hours ago, Tiffany_Waggoner said:

Any help with this issue would be appreciated, as I'm still a novice when working within this system.

In older versions of oscommerce, the session is started in the includes/application_top.php file.  Add the following before the line to start the session and, I think, it will work:

ini_set('session.cookie_samesite', 'None');

But it also depends on which version of php are upgrading to since the code changed for setting cookies in the later versions, after 7.2 I think.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...