질문을 삭제하지 말아주세요.!
 
1
0
-1

\Crypt::decrypt 로 쿠키값을 복호화 하려고 하는데

unserialize(): Error at offset 0 of 2 bytes

위 에러가 나네요 ... 원인이 뭔지 모르겠어서 질문올립니다

php7 , laravel 5.6 입니다

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1
      [2018-09-27 08:26:13] local.ERROR: unserialize(): Error at offset 0 of 2 bytes {"exception":"[object] (ErrorException(code: 0): unserialize(): Error at offset 0 of 2 bytes at C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Encryption\\Encrypter.php:149)
      [stacktrace]
      #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'unserialize(): ...', 'C:\\\\Laravel\\\\myap...', 149, Array)
      #1 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Encryption\\Encrypter.php(149): unserialize('en')
      #2 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\Facades\\Facade.php(223): Illuminate\\Encryption\\Encrypter->decrypt(Array)
      #3 C:\\Laravel\\myapp\\app\\Providers\\AppServiceProvider.php(17): Illuminate\\Support\\Facades\\Facade::__callStatic('decrypt', Array)
      #4 [internal function]: App\\Providers\\AppServiceProvider->boot()
      #5 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(29): call_user_func_array(Array, Array)
      #6 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
      #7 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
      #8 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(564): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
      #9 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(794): Illuminate\\Container\\Container->call(Array)
      #10 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(777): Illuminate\\Foundation\\Application->bootProvider(Object(App\\Providers\\AppServiceProvider))
      #11 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}(Object(App\\Providers\\AppServiceProvider), 18)
      #12 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(778): array_walk(Array, Object(Closure))
      #13 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Bootstrap\\BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
      #14 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(206): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
      #15 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
      #16 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
      #17 C:\\Laravel\\myapp\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
      #18 C:\\Laravel\\myapp\\public\\index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
      #19 C:\\Laravel\\myapp\\server.php(21): require_once('C:\\\\Laravel\\\\myap...')
      #20 {main}
      "}
        CommentAdd your comment...