diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index ca1332cfaa1..bcd992128eb 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -83,7 +83,8 @@ Example usage:: use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler; - $storage = new NativeSessionStorage(array(), new PdoSessionHandler()); + $pdo = new \PDO('mysql:dbname=testdb;host=127.0.0.1'); + $storage = new NativeSessionStorage(array(), new PdoSessionHandler($pdo)); $session = new Session($storage); Configuring PHP Sessions