I am using two cakephp framework . Problem is when I logged in to 1 st one, without login I can login to 2nd one by using same session. how to resolve this issue . I am using cakephp 2x
Asked
Active
Viewed 36 times
-3
-
It is difficult to help you without properly laying out your problem. This does not tell me anything specific – AKKAweb Feb 02 '16 at 16:38
-
Possible duplicate of [User sessions and two CakePHP applications running in the same machine](http://stackoverflow.com/questions/14627712/user-sessions-and-two-cakephp-applications-running-in-the-same-machine) – pedrostanaka Feb 02 '16 at 23:11
1 Answers
0
From what you are saying I understood that you have two applications running on the same server (the default realm for Auth plugin). And what is happening is that once you login in one application the other lets you access the protected locations without the need to login (I've faced this).
IF this is your issue you can either change the prefixes of the applications in the configuration file app/Config/core.php
.
It is one line like this:
<?php [...]
$prefix = 'myapp_';
Change the prefix to other name.
OR
Configure the realm
key in the AuthComponent configuration to other value than the 'servername' which is the default.
For this one check the docs and search for 'realm'.

pedrostanaka
- 711
- 1
- 9
- 16