User sessions and two CakePHP applications running in the same machine

坚强是说给别人听的谎言 提交于 2019-12-07 12:32:17

问题


I have 2 CakePHP applications running on the same machine. Both of them need a previous registration to have access to them and the first thing users see is the login form.

I have realized that when I do login in one of them, then, I can access to the other web application without being asked for my credentials to login. (which is not correct)

In my Controllers of both applications I have this to deny access without a previous login.

public function beforeFilter(){
    parent::beforeFilter();

    $this->Auth->deny();
}

But this seems not to work properly when I use the same browser and I do login in one of this applications.

Why is this happening? Is there any way to solve this?

Thanks.


回答1:


The cookiename and/or cache prefix should be different for both applications.

You can find those settings in the core.php file



来源:https://stackoverflow.com/questions/14627712/user-sessions-and-two-cakephp-applications-running-in-the-same-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!