Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

session_write_close(): Failed to write session data using user defined save handler. #77

@intellent

Description

@intellent

Occasionally,we get the following not yet reproducible warning:

WARN: session_write_close(): Failed to write session data using user defined save handler. (session.save_path: ) {"errno":2,"file":"/var/www/html/vendor/zendframework/zend-session/src/SessionManager.php","line":229}

This is how we initialize the session:

// Load config
$config = $serviceManager->get('Config');

// Initialize session
$sessionConfig = new SessionConfig();
$sessionConfig->setOptions($config['session']);

$sessionTableGateway = new TableGateway('session', $serviceManager->get('Zend\Db\Adapter\Adapter'));
$saveHandler = new DbTableGateway($sessionTableGateway, new DbTableGatewayOptions());

$sessionManager = new SessionManager($sessionConfig, null, $saveHandler);
$sessionManager->setName($config['session']['name']);

$sessionManager->start();

Container::setDefaultManager($sessionManager);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions