English 中文(简体)
CakePHP 库克群岛/圭亚那问题
原标题:CakePHP Cookie/Session problems

我对卡纳克民阵的申请提出了问题。 这似乎只是在电子计算机中,而且只在某些计算机上。 这在计算机上是一致的。

Issue one: User is logged in and on the page https://example.com/users/view and clicks sign out. User is redirected to http://example.com and appears to be logged out until the user visits another https page and they are still logged in. They can click log out as many times as they want but they are always logged in on https and only get logged out on http.

Issue two: User logs in at https://example.com/users/signin they are redirected to http://example.com and now appear to be logged in. User goes to https://example.com/admin/slides and does not know it yet but is now logged out, clicking on any other page (or just refreshing their current page) will ask them to log in again.

我没有任何想法。 我阅读并尝试了上述两个类似问题的解决办法:。 在从sl转向非sl中续签/写字,但我仍然有同样的问题。

我迄今为止注意到的唯一内容(我不知道这是否意味着什么)是:I debug在以下两种情况下:_SESSION$this->Session->read( on HTTP pages ALWAYS only$this->Session->read(read)回报价值。 一些ALWAYS公司在HTTPS的网页上将同样的价值归还给这两个单位,而其他ALWAYS则只退回了一笔价值,即:thi->read()。

例如,http://example.comhttps://example.com/users。 https://example.com/carts“rel=“nofollow noreferer”>。 总是见美元。 我不敢肯定,但我认为,或许安全页本应看到,因为有些人可能不会错过,但我检查法典时,我看不出有什么区别,会说明为什么有人这样做,谁是。

Also, if I add $this->Session->destroy() to the beforeFilter in AppController, then all pages even HTTP can see $_SESSION. I am not actually use $_SESSION in my application, I just thought this might be a clue to whats wrong.


UPDATE

我听取了古斯塔夫·贝尔特拉姆的建议,并研究了用户代理人的扼杀。 我比较了在计算机上的用户代理人,该计算机在计算机上向电子计算机公司发行,而该计算机没有问题。 除出现问题外,在使用代理方扼杀中,还存在着“google chromeframe”。 我把谷歌 Chrome光从该计算机中解冻,重新启用,再次尝试,问题似乎得到解决。

如果这是真正的原因,那么简单的解决办法就是使用户不 un。 然而,我想知道,是否围绕工作开展了工作,以便他们能够安装和继续工作。

最佳回答

请在您的核心部分增加以下内容。 php file:

Configure::write( Session.checkAgent , false);
Configure::write( Session.ini ,array( session.cookie_secure  => false,  session.referer_check  => false));

这些参数应迫使 co子甚至通过谷歌 Chrome岩而持续存在。 这将为PHP和CakePHP留出环境,使 co得以在https和https上长期存在。

问题回答

我的建议是,你直接检查包装单,看 co发生什么。

Install Wireshark,载于您的客户机器,并链接到遥远的网络服务器。 (Wireshark将无视当地东道交通。)

我怀疑,你的厨师们要么 man笑(我曾经有过一些 co子,被PHP!笑!)要么被 st笑(这将是IE的错)。 不管怎么说,你都会获得更多关于什么错误的信息。

作为最后的手段,检查法典中关于犯罪/无支持版本的紧急紧急应急反应的用户-代理人,并敦促人们升级。

请各位主计长在座,看看看是否这样做。 我感觉到的是,像你需要的那样, settings虫环境是n的。 更多信息见

function beforeFilter() {
    $this->Cookie->domain =  .example.com ;
    $this->Cookie->secure = false;
}

您是否确保了在关闭了实验室之后没有任何空间或新线路? 也许这是你检查的第一个事项,但从经验来看,我知道,关闭得很糟糕的“营地”的标签确实在“营地”会议处理中造成零星问题。





相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...