Skip to content

Instantly share code, notes, and snippets.

@davidstrauss
Created August 31, 2015 22:33
Show Gist options
  • Save davidstrauss/75949e141824aeeb3708 to your computer and use it in GitHub Desktop.
Save davidstrauss/75949e141824aeeb3708 to your computer and use it in GitHub Desktop.
$settings = json_decode($_SERVER['PRESSFLOW_SETTINGS'], true); // Perhaps should read Redis settings more directly.
ini_set('session.save_handler', 'redis');
ini_set('session.save_path', 'tcp://' . $settings['conf']['redis_client_host'] . ':' . $settings['conf']['redis_client_port'] . '?auth=' . $settings['conf']['redis_client_password']);
session_set_cookie_params(15*60, '/', $_SERVER["HTTP_HOST"], true, true);
session_start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment