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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:05:35+00:00 2026-06-07T17:05:35+00:00

I have 2 codeigniter installs running on the same server. the first app is

  • 0

I have 2 codeigniter installs running on the same server.

the first app is :
localhost/aa/index.php

second app is :
localhost/aa/invoice/index.php

The second app is in the first app folder. In the live environment, they will be on the same domain. I am trying to get a single sign-on to work — so, if i have userdata set in the aa application I should be able to verify it in the invoice folder also.

Is there a way to share the sessions.

As the folders will always be on the same domain, I am open to working with sessions outside the ci library(only php) also.

Edit :
They show the same session id when they don’t have any data. The moment I add some variables on one application, the other goes out of sync.

Also I have sessions being stored in the database(both applications share the same database.)

Please suggest.

Thanks! : )

  • 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-07T17:05:37+00:00Added an answer on June 7, 2026 at 5:05 pm

    Codeigniter for some reason rolls its own session implementation rather than native PHP sessions.

    http://codeigniter.com/user_guide/libraries/sessions.html

    You get a choice of using:

    1. cookie storage (not ideal, small storage size, sensitive data in a cookie?).
    2. database sessions (persisted using session id cookie).
    3. Override and roll your own (to use native php sessions!)

    Obviously you need to make sure your session identifier is configured correctly so both apps can read from the same session data. If using the database implementation, you need to make sure both apps can access the same DB.

    To add to the complexity, if you choose to encrypt sessions, the salt used by the encryption class will also need to be the same in both apps, so either one is able to decrypt the shared session data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have CodeIgniter without /index.php/ URL and i want to link CSS file in
i have written a small codeigniter test app that is currently running on my
I have a CodeIgniter app that works on one server (IIS 6) just fine.
I have setup Codeigniter on my server and I installed Grocery crud on it.
I have tried by myself to install Rediska (Redis PHP client) into my codeigniter
I have an Codeigniter app (using version 2.1.0) that is writing a transaction to
I have a codeigniter application which creates folders using php. The owner of any
I have a codeigniter app that queryies an api and gets a simplexml object.
I have a codeigniter website that runs beautifully on localhost, but now that I
I have never before rewritten a URL except for removing the index.php part of

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.