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.
The applications are probably running on the same domain, e.g.
http://localhost/app1andhttp://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: