在session_write_close() - DRUPAL 8中不允许序列化'Closure'

时间:2017-05-16 10:10:44

标签: php session nginx drupal

我在drupal 8中遇到会话问题。

我的代码在登台服务器(apache服务器)上正常工作但在live(nginx服务器)中不能正常工作

在我的自定义模块中,我有$_SESSION(本地会话关键字)来存储变量

PHP VERSION: 7.0.x

我在谷歌搜索了很多,但没有办法解决这个问题

  The website encountered an unexpected error. Please try again later.
    Exception: Serialization of 'Closure' is not allowed in session_write_close() (line 226 of vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php).
    session_write_close() (Line: 226)
    Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->save() (Line: 197)
    Drupal\Core\Session\SessionManager->save() (Line: 181)
    Symfony\Component\HttpFoundation\Session\Session->save() (Line: 60)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 20)

提示:如果facebook graph sdk没有此工作正常,则会出现问题

0 个答案:

没有答案