Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Last active July 29, 2017 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/fbe947166a54e3d229535efade09a116 to your computer and use it in GitHub Desktop.
Save uno-de-piera/fbe947166a54e3d229535efade09a116 to your computer and use it in GitHub Desktop.
<?php
$di->setShared('session', function() {
//establecer el límite en 1 hora
ini_set('session.gc_maxlifetime', 3600);
session_set_cookie_params(3600);
//iniciar la sesión
$session = new SessionAdapter();
$session->start();
return $session;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment