Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7917759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:15:31+00:00 2026-06-03T15:15:31+00:00

This might be slightly confusing, so please bear with me for a moment while

  • 0

This might be slightly confusing, so please bear with me for a moment while i explain the issue.

I have a website http://www.mydomain.com and a mobile version m.mydomain.com
The main website does not have any specific cookie_params set
The mobile site specifically sets

session_set_cookie_params(0, '/', '.mydomain.com');

Mobile devices are auto-detected & directed to the mobile site.

The mobile site uses https://www.mydomain.com/mobile/ for the checkout so that the SSL cert is valid. So we are switching from m. to www. when we go secure.

Here is where the strangeness begins…

On my iPhone I can go through the whole process with no issues at all.

However, when I use a computer browser & specifically chose to use the mobile site, I cannot get into the checkout – the reason being is that the session_id is changing between m. & www. (& the database cannot find your basket items, so it won’t let you in to the checkout)
or rather that there are 2 sessions id’s – one for www. & one for m.

Given that every page of the mobile site has the above param set, why is the computer browser opting to use the www. session id ?

Any suggestions to solve this greatly appreciated.

Additional info:
I removed all cookies from firefox & restarted the browser. I went directly to m.mydomain.com & this works OK, am able to checkout.

So perhaps with this info the question becomes is there a way to force the mobile site – regardless of the URL – to use a specific cookie param name?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:15:33+00:00Added an answer on June 3, 2026 at 3:15 pm
    session_set_cookie_params(0, '/', '.'.str_replace('www.','',$_SERVER['HTTP_HOST']));
    session_name('ses_name');
    session_start();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a simple question but I'm just picking this up so please
This might seem like a weird question, but bear with me. I'd like to
This might seem a slightly subjective question however I am looking for what is
All this might look too trivial but read it through - I have simple
The question might be slightly hard to understand, so I'll explain it more verbosely:
Similar question here but this is slightly different... I have two tables that I
This question might be slightly subjective, but I am unsure where else it would
This might be a really trivial one. Is File storage OS dependant ? Why
This might be the most stupid thing i've ever seen, i had a broken
This might be basic question but how do I create a list of lists

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.