问题描述
当我尝试服务器站点登录时出现此错误.
This Error comes When i try to server site login.
如何解决此错误?
推荐答案
Laravel对V5.6.30中处理cookie的方式进行了更改,以提高安全性.可能是您试图解密未序列化的内容,反之亦然.
Laravel made a change to the way it handles cookies from V5.6.30 to improve security. It may be that you are trying to decrypt something that isn't serialized or vice versa.
首先,在浏览器中删除cookie和/或在Laravel应用中清除会话文件.
或者,在中间件app\Http\Middleware\EncryptCookies.php
中,您可以将其翻转以进行测试:
Or, within the middleware app\Http\Middleware\EncryptCookies.php
, you can flip it to test:
添加:protected static $serialize = true;
这是一个非常常见的问题-如果不起作用,您可以在堆栈溢出中搜索类似的答案.
This is a pretty common question - you can search stack overflow for similar answers if this doesn't work.
这篇关于unserialize():40个字节的偏移量0处出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!