Laravel中的ErrorException [会话]

时间:2018-09-06 08:00:52

标签: php laravel

并非一直如此,但非常频繁, 我的使用laravel框架制作的网站显示

ErrorException

SessionHandler :: gc():ps_files_cleanup_dir:opendir(/ var / lib / php / sessions)失败:权限被拒绝(13)

13.ErrorException ../ vendor / symphony / http-foundation / Symphony / Component / HttpFoundation / Session / Storage / Proxy / SessionHandlerProxy.php:93

这是我的SessionHandlerProxy.php

    /**
     * Constructor.
     *
     * @param \SessionHandlerInterface $handler
     */
    public function __construct(\SessionHandlerInterface $handler)
    {
        $this->handler = $handler;
        $this->wrapper = ($handler instanceof \SessionHandler);
        $this->saveHandlerName = $this->wrapper ? ini_get('session.save_handler') : 'user';
    }

    // \SessionHandlerInterface

    /**
     * {@inheritdoc}
     */
    public function open($savePath, $sessionName)
    {
        $return = (bool) $this->handler->open($savePath, $sessionName);

        if (true === $return) {
            $this->active = true;
        }

        return $return;
    }

    /**
     * {@inheritdoc}
     */
    public function close()
    {
        $this->active = false;

        return (bool) $this->handler->close();
    }

    /**
     * {@inheritdoc}
     */
    public function read($id)
    {
        return (string) $this->handler->read($id);
    }

    /**
     * {@inheritdoc}
     */
    public function write($id, $data)
    {
        return (bool) $this->handler->write($id, $data);
    }

    /**
     * {@inheritdoc}
     */
    public function destroy($id)
    {
        return (bool) $this->handler->destroy($id);
    }

    /**
     * {@inheritdoc}
     */
    public function gc($maxlifetime)
    {
        return (bool) $this->handler->gc($maxlifetime);
    }
}

0 个答案:

没有答案