Skip to content

Instantly share code, notes, and snippets.

@iamstoick
Created August 23, 2020 23:18
Show Gist options
  • Select an option

  • Save iamstoick/e9681d95378c51ccc6104cbe4f34626b to your computer and use it in GitHub Desktop.

Select an option

Save iamstoick/e9681d95378c51ccc6104cbe4f34626b to your computer and use it in GitHub Desktop.

Revisions

  1. iamstoick created this gist Aug 23, 2020.
    5 changes: 5 additions & 0 deletions session.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    $settings = json_decode($_SERVER['PRESSFLOW_SETTINGS'], true);
    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();