douzhicong5965 2016-01-13 16:47
浏览 49
已采纳

cakephp 3 [RuntimeException]无法配置会话,设置session.cookie_path失败

I try to transfer a cakephp3 application from my local server to a webspace.

I get the following error-message:

[RuntimeException] Unable to configure the session, setting session.cookie_path failed

What does this mean and how can I fix it?

http://marcusmoenius.lima-city.de/app/users/login

  • 写回答

2条回答 默认 最新

  • dragonsun2005 2016-01-14 09:31
    关注

    So I applied a workaround:

    following the stacktrace I opened the file

    /app/vendor/cakephp/cakephp/src/Network/Session.php(212): Cake\Network\Session->options(Array)

    and scrolled to line 212

    there I changed

        if (!empty($config['ini']) && is_array($config['ini'])) {
            $this->options($config['ini']);
        }
    

    to

        if (!empty($config['ini']) && is_array($config['ini'])) {
            //$this->options($config['ini']);
        }
    

    My website loads now and I can login and logout

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?