2014-03-01 71 views
3

这发生在我身上过去3次。现在我真的想弄清楚问题所在。我最后几次修好它的方式就是走开。几个小时后我回来时,一切都按预期工作,直到几天后再次发生。我在没有更新任何代码的情况下点击页面,然后突然间一切都停止了。在/Illuminate/Session/SessionServiceProvider.phplaravel undefined index session

驱动程序错误没有什么写在Laravel日志文件:

我得到一个未定义的索引。 php_errors.log文件没有任何细节,apache_error.log文件也没有。我完全被难倒了,还有死在水里。我试着倒退到以前的提交版本,以确保我没有破坏某些东西。但同样的问题不管我走多远。

下面就是我得到:

ErrorException 未定义指数:司机 开:/Users/website/laravel4/vendor/laravel/framework/src/Illuminate/Session/SessionServiceProvider.php

protected function registerSessionEvents() 
{ 
    $config = $this->app['config']['session']; 

    // The session needs to be started and closed, so we will register a before 
    // and after events to do all stuff for us. This will manage the loading 
    // the session "payloads", as well as writing them after each request. 
    **if (! is_null($config['driver']))** 
    { 
$this->registerBootingEvent(); 

94行突出显示,在上面的代码中用两个星号表示。 我运行Laravel 4.0版

我也试着更新作曲家

composer.json包含:

{ 
"require": { 
    "laravel/framework": "4.0.*" 
}, 
"autoload": { 
    "classmap": [ 
     "app/commands", 
     "app/controllers", 
     "app/models", 
     "app/database/migrations", 
     "app/database/seeds", 
     "app/libraries", 
     "app/tests/TestCase.php" 
    ] 
}, 
"scripts": { 
    "post-update-cmd": "php artisan optimize" 
}, 
"minimum-stability": "dev" 
} 

我也试着改变最小的稳定性,以“稳定”,而没似乎也没有做到这一点。

任何帮助解决这个谜,将不胜感激。

+0

作曲家的作业是非常不稳定的...只是每次它崩溃。 – Rolice

+0

您可能想坚持稳定版本。 – majidarif

回答

1

会话处理在4.0和4.1之间进行了大量清理(有关详细信息,请参阅https://github.com/laravel/framework/commit/e0fe79e398003e54d54f2626e1283e97209b7f50#diff-a5878ed0d054cbfc634bf582d41b1848)。在改变之前,我曾经看到难以预测并且难以解释会话问题。

如果您仍在使用4.0版本,那么您可能会在清理过程中出现错误。所以虽然它有点模糊和蓬松,但我建议升级到4.1并查看问题是否消失。

+0

我将尝试升级并查看会发生什么。敬请关注。 – SeaFuzz

相关问题