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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:18:44+00:00 2026-05-29T20:18:44+00:00

i have two php applications in my local wamp server. both applications use the

  • 0

i have two php applications in my local wamp server. both applications use the same mechanism to check the authentication by storing the login in sessions. my issue is if i login successfully in one application, the other app login automatically if i open in the same browser. both application login validation use the same php code(i copied from one app to the other).

my concern is how two application share the same session in wamp server? what i’m doing wrong?

thanks in advance.

  • 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-05-29T20:18:46+00:00Added an answer on May 29, 2026 at 8:18 pm

    The applications are probably running on the same domain, e.g. http://localhost/app1 and http://localhost/app2. By default, PHP’s session cookie is valid for the entire domain, so naturally, both applications share the session cookie. Here’s what you can do:

    • Use different session cookie names for either application (see http://www.php.net/manual/en/function.session-name.php for how to do this)
    • Run the applications on different domains (or subdomains); you can simulate this locally by adding fake domains to your hosts file, and running both applications on different Apache VHosts (or even on the same VHost, but then both applications will be available on both pseudo-domains)
    • Limit the path on which the session cookie is valid (see http://www.php.net/manual/en/function.session-set-cookie-params.php for details).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two PHP applications on the same Apache server. At some point, application
I have two PHP scripts, both using the same session by calling session_name('MySessID') .
I have two applications (PHP and .NET) working on the same machine but different
I have two PHP functions to calculate the relation between two texts. They both
Basically I have two applications: a PHP web application that runs over Apache and
I have two PHP web applications. All of the apps are located on the
I have two classes in a PHP application, B extending A for example. Class
I have two PHP files that I need to link. How can I link
I am confused with & and && . I have two PHP books. One
I have two folders php and perl . They contain index.php and index.pl ,

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.