Laravel会话不在服务器上运行

时间:2016-04-26 15:01:56

标签: php laravel session server

我试图登录我的网站,但重新路由或更改页面时会话丢失。 这是几天前出现的一个问题,一切都在正常工作了几个月,但现在还没有发生。成就不能登录我的服务器,但在我的本地机器上一切都运行良好。

控制器

public function Login(){
    $data = Input::only('email','password','remember');
    $credentials['email'=>$data['email'],'password'=>$data['password']];


    if (Auth::attempt($credentials,$data['remember']))
    {
        return Redirect::back();
    }
    else
    {
        return Redirect::back()->with('login_error', 1);    
    }
}

2 个答案:

答案 0 :(得分:2)

我需要

with t(dateStart , Item, Location,  stock_on_hand) as
(select to_date('28/12/2015', 'dd-mm-yyyy'),     'I1',          'L1',          50 from dual union all
select to_date('04/01/2016', 'dd-mm-yyyy'),      'I1',          'L1',          30 from dual union all
select to_date('25/01/2016', 'dd-mm-yyyy'),      'I1',          'L1',          60 from dual union all
select to_date('15/02/2016', 'dd-mm-yyyy'),      'I1',          'L1',          50 from dual union all
select to_date('01/01/2018', 'dd-mm-yyyy'),      'I1',          'L1',          30 from dual union all
select to_date('04/01/2016', 'dd-mm-yyyy'),      'I2',          'L1',          40 from dual union all
select to_date('15/02/2016', 'dd-mm-yyyy'),      'I2',          'L1',          10 from dual union all
select to_date('04/01/2016', 'dd-mm-yyyy'),      'I1',          'L2',          30 from dual union all
select to_date('15/02/2016', 'dd-mm-yyyy'),      'I1',          'L2',          40 from dual union all
select to_date('15/02/2016', 'dd-mm-yyyy'),      'I1',          'L3',          40 from dual),
temp(dateStart, Item,   Location,  stock_on_hand, ct) as(
select dateStart , Item,   Location,  stock_on_hand, nvl((lead(dateStart) over(partition by Item, Location order by dateStart)-dateStart)/7,1) from t)
select dateStart + (rn - 1)*7 as week, Item, Location,  stock_on_hand
    from temp, xmltable('1 to xs:integer($ct)' passing ct as "ct" columns rn number path '.')
    order by Item, Location , dateStart

让我的会话开始工作。

答案 1 :(得分:0)

在app / config / session.php文件中检查一下您正在使用的驱动程序。将其更改为支持的驱动程序,如本机,memcached,数组等,并尝试它可能会工作。