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 8762723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:36:13+00:00 2026-06-13T15:36:13+00:00

I have two domains abc.com and xyz.com in one server,both have the exact code.The

  • 0

I have two domains abc.com and xyz.com in one server,both have the exact code.The problem is in xyz.com the codeigniter session variable got reset on page refresh in chrome browser.But there is no such issues in abc.com.It works fine in Mozilla in both domains.What will be the root of issue?Is it related with domain,htaccess?Please advice.

  • 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-13T15:36:14+00:00Added an answer on June 13, 2026 at 3:36 pm

    I have had this (or a very similar) issue before, and i solved it by enabling sessions to use the database.

    i.e in the config.php , make sess_use_database to true, i.e

    $config['sess_cookie_name']     = 'ci_session';
    $config['sess_expiration']      = 7200;
    $config['sess_expire_on_close'] = FALSE;
    $config['sess_encrypt_cookie']  = FALSE;
    $config['sess_use_database']    = TRUE;
    $config['sess_table_name']      = 'ci_sessions';
    $config['sess_match_ip']         = FALSE;
    $config['sess_match_useragent'] = FALSE; //you can try this with TRUE and see if it works
    $config['sess_time_to_update']  = 300;
    

    make sure the session table is set in the database as well. if not, here is the sql,

    CREATE TABLE IF NOT EXISTS `ci_sessions` (
      `session_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0',
      `ip_address` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '0',
      `user_agent` varchar(150) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
      `last_activity` int(10) unsigned NOT NULL DEFAULT '0',
      `user_data` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
      `session_data` text NOT NULL,
      PRIMARY KEY (`session_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two domains - abc.com and xyz.com. I have a CNAME that points
let suppose i have two domains 1. abc.com 2. xyz.com now the thing i
I have code seperated in two domain. Both domains and code is trusted. I
I have two domains with pretty much the same code on both, (version control)
I have two domains: mydomain.com and mydomain.fr They both correspond to the same IP
I have two domains, one is a .com domain and the other is a
We have two domains, www.aaa.com and www.bbb.com. Both point to the same root directory
I have two domains which are similar, mysite1.com and mysite2.com I only have one
I have two domains that are aliases, domain1.com and domain2.com Currently they are both
I have two domains for example www.male.com and www.female.com which both point to the

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.