(WAMP上的CakePHP)页面仅在IE中加载时挂起


(CakePHP on WAMP) page hangs on load only in IE

我正在用CakePHP开发一个应用程序,并一直在用Firefox调试它。一切都很好,直到我决定用IE测试它,发现了一些非常奇怪的行为。有时页面不会在IE中加载,它们只是处于加载状态。挂起的页面非常简单,只使用CakePHP的Html助手创建一个表单,并使用AuthComponent::User()进行检查(查看用户是否登录)。我确信这个问题与会议有关。假设我要在IE中打开页面,但它确实挂起了,在IE中停止连接之前,我无法在Firefox中查看页面。

同样,这个问题在Firefox中不会发生。我已经尝试过CakePHP中SessionId cookie中发布的导致页面挂起的修复程序,但没有成功。

更新:我刚刚安装了XDebug。我在我的webroot目录中的index.php一开始就调用了xdebug_break()。当IE中的请求挂起时,此断点永远不会被触发。我现在怀疑WAMP在作怪?

这是引起关注的代码,这是在我的根控制器中所有其他控制器扩展的。

public function beforeFilter()
{
    if($this->Auth->user())
    {
        if($this->Auth->user('roles') == 'admin')
            $this->layout = 'admin';
        else if($this->Auth->user('roles') == 'partner')
            $this->layout = 'partner';
        else if($this->Auth->user('roles') == 'user')
            $this->layout = 'user';
    }
    $this->set('currentController', $this->request['controller']);
    $this->set('username', $this->Auth->user('username'));
}

这似乎是Apache的一个问题。

通过添加解决

AcceptFilter http none
AcceptFilter https none

到我的httpd.conf

http://forums.laravel.io/viewtopic.php?id=7920