Whoops \ Exception \ ErrorException (E_WARNING)
session_name(): Cannot change session name when headers already sent Whoops\Exception\ErrorException thrown with message "session_name(): Cannot change session name when headers already sent" Stacktrace: #16 Whoops\Exception\ErrorException in /home/sarahgar/site/ccnov2/kirby/vendor/getkirby/toolkit/lib/s.php:48 #15 session_name in /home/sarahgar/site/ccnov2/kirby/vendor/getkirby/toolkit/lib/s.php:48 #14 S:start in /home/sarahgar/site/ccnov2/kirby/vendor/getkirby/toolkit/lib/s.php:185 #13 S:get in /home/sarahgar/site/ccnov2/kirby/core/user.php:412 #12 UserAbstract:current in /home/sarahgar/site/ccnov2/kirby/core/site.php:314 #11 SiteAbstract:user in /home/sarahgar/site/ccnov2/site/snippets/header.php:55 #10 require in /home/sarahgar/site/ccnov2/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #9 Tpl:load in /home/sarahgar/site/ccnov2/kirby/kirby/component/snippet.php:38 #8 Kirby\Component\Snippet:render in /home/sarahgar/site/ccnov2/kirby/helpers.php:12 #7 snippet in /home/sarahgar/site/ccnov2/site/templates/home.php:1 #6 require in /home/sarahgar/site/ccnov2/kirby/vendor/getkirby/toolkit/lib/tpl.php:22 #5 Tpl:load in /home/sarahgar/site/ccnov2/kirby/kirby/component/template.php:103 #4 Kirby\Component\Template:render in /home/sarahgar/site/ccnov2/kirby/kirby.php:681 #3 Kirby:template in /home/sarahgar/site/ccnov2/kirby/kirby.php:669 #2 Kirby:render in /home/sarahgar/site/ccnov2/kirby/kirby/component/response.php:29 #1 Kirby\Component\Response:make in /home/sarahgar/site/ccnov2/kirby/kirby.php:751 #0 Kirby:launch in /home/sarahgar/site/ccnov2/index.php:16
Stack frames (17)
16
Whoops
\
Exception
\
ErrorException
/
vendor
/
getkirby
/
toolkit
/
lib
/
s.php
48
15
session_name
/
vendor
/
getkirby
/
toolkit
/
lib
/
s.php
48
14
S
start
/
vendor
/
getkirby
/
toolkit
/
lib
/
s.php
185
13
S
get
/
core
/
user.php
412
12
UserAbstract
current
/
core
/
site.php
314
11
SiteAbstract
user
/
home
/
sarahgar
/
site
/
ccnov2
/
site
/
snippets
/
header.php
55
10
require
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
22
9
Tpl
load
/
kirby
/
component
/
snippet.php
38
8
Kirby
\
Component
\
Snippet
render
/
helpers.php
12
7
snippet
/
home
/
sarahgar
/
site
/
ccnov2
/
site
/
templates
/
home.php
1
6
require
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
22
5
Tpl
load
/
kirby
/
component
/
template.php
103
4
Kirby
\
Component
\
Template
render
/
kirby.php
681
3
Kirby
template
/
kirby.php
669
2
Kirby
render
/
kirby
/
component
/
response.php
29
1
Kirby
\
Component
\
Response
make
/
kirby.php
751
0
Kirby
launch
/
home
/
sarahgar
/
site
/
ccnov2
/
index.php
16
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
s.php
   * // do whatever you want with the session now
   * 
   * </code>
   * 
   */  
  public static function start() {
 
    if(session_status() === PHP_SESSION_ACTIVE) return true;
 
    // store the session name
    static::$cookie += array(
      'lifetime' => 0,
      'path'     => ini_get('session.cookie_path'),
      'domain'   => ini_get('session.cookie_domain'),
      'secure'   => r::secure(),
      'httponly' => true      
    );
 
    // set the custom session name
    session_name(static::$name); 
 
    // make sure to use cookies only
    ini_set('session.use_cookies', 1);
    ini_set('session.use_only_cookies', 1);
    
    // set additional cookie options
    session_set_cookie_params(
      cookie::lifetime(static::$cookie['lifetime']),
      static::$cookie['path'],
      static::$cookie['domain'],
      static::$cookie['secure'],
      static::$cookie['httponly']
    );
 
    // try to start the session
    if(!session_start()) return false;
 
    // mark it as started
    static::$started = true;
 
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
s.php
   * // do whatever you want with the session now
   * 
   * </code>
   * 
   */  
  public static function start() {
 
    if(session_status() === PHP_SESSION_ACTIVE) return true;
 
    // store the session name
    static::$cookie += array(
      'lifetime' => 0,
      'path'     => ini_get('session.cookie_path'),
      'domain'   => ini_get('session.cookie_domain'),
      'secure'   => r::secure(),
      'httponly' => true      
    );
 
    // set the custom session name
    session_name(static::$name); 
 
    // make sure to use cookies only
    ini_set('session.use_cookies', 1);
    ini_set('session.use_only_cookies', 1);
    
    // set additional cookie options
    session_set_cookie_params(
      cookie::lifetime(static::$cookie['lifetime']),
      static::$cookie['path'],
      static::$cookie['domain'],
      static::$cookie['secure'],
      static::$cookie['httponly']
    );
 
    // try to start the session
    if(!session_start()) return false;
 
    // mark it as started
    static::$started = true;
 
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
s.php
  /**
   * Gets a session value by key
   * 
   * <code>
   * 
   * s::get('username', 'bastian');
   * // saves the username in the session
   * 
   * echo s::get('username');
   * // output: 'bastian'
   * 
   * </code>   
   *
   * @param  mixed    $key The key to look for. Pass false or null to return the entire session array. 
   * @param  mixed    $default Optional default value, which should be returned if no element has been found
   * @return mixed
   */  
  public static function get($key = false, $default = null) {
 
    static::start(static::$name, static::$timeout, static::$cookie);
 
    if(!isset($_SESSION)) return false;
    if(empty($key)) return $_SESSION;
    return isset($_SESSION[$key]) ? $_SESSION[$key] : $default;
 
  }
 
  /**
   * Retrieves an item and removes it afterwards
   * 
   * @param string $key
   * @param mixed $default
   * @return mixed
   */
  public static function pull($key, $default = null) {
    $value = s::get($key, $default); 
    s::remove($key);
    return $value;
  }
 
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
core
/
user.php
      throw new Exception('The user account could not be saved');
    } else {
      return true;
    }
 
  }
 
  static public function unauthorize() {
 
    s::remove('kirby_auth_secret');
    s::remove('kirby_auth_username');
 
    cookie::remove('kirby_auth');
 
  }
 
  static public function current() {
 
    $cookey   = cookie::get(s::$name . '_auth'); 
    $username = s::get('kirby_auth_username'); 
 
    if(empty($cookey)) {
      static::unauthorize();
      return false;
    }
 
    if(s::get('kirby_auth_secret') !== sha1($username . $cookey)) {
      static::unauthorize();
      return false;
    }
 
    // find the logged in user by token
    try {
      $user = new static($username);
      return $user;
    } catch(Exception $e) {
      static::unauthorize();
      return false;
    }
 
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
core
/
site.php
    return null;
  }
 
  /**
   * Returns a collection of all users
   *
   * @return Users
   */
  public function users() {
    return new Users();
  }
 
  /**
   * Returns the current user
   *
   * @param string $username Optional way to search for a single user
   * @return User
   */
  public function user($username = null) {
    if(is_null($username)) return User::current();
    try {
      return new User($username);
    } catch(Exception $e) {
      return null;
    }
  }
 
  /**
   * Returns a collection of all roles
   *
   * @return Roles
   */
  public function roles() {
    return new Roles();
  }
 
  /**
   * Gets the last modification date of all pages
   * in the content folder. 
   * 
/
home
/
sarahgar
/
site
/
ccnov2
/
site
/
snippets
/
header.php
  <meta name="twitter:card" content="summary">
  <meta name="twitter:site" content="">
  <meta name="twitter:creator" content="<?php echo $site->author()->html() ?>">
 
  <meta name="apple-mobile-web-app-capable" content="yes">
 
 
  <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
  <link rel="manifest" href="/site.webmanifest">
  <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
  <meta name="msapplication-TileColor" content="#00aba9">
  <meta name="theme-color" content="#ffffff">
 
 
 
</head>
<body
   data-login="<?php e($site->user(),'true', 'false') ?>"
   data-template="<?php echo $page->template() ?>"
   data-intended-template="<?php echo $page->intendedTemplate() ?>"
    data-parent-template="<?php echo $page->parent()->template() ?>"
    <?php $section = getRubriqueFromUri($page->uri());?>
    data-rubrique="<?= $section ?>"
    data-count = "<?= $pages->visible()->count()?>"
    
 
    <?php if($section == 'voulez-vous-danser'):?>
      style="background: <?php echo $site->index()->find('voulez-vous-danser')->color()?>"
    <?php endif;?>
    <?php if($page->template() == 'jgm'):?>
      style="background: <?php echo $page->backcolor()?>"
    <?php endif;?>
  >
 
  <?php snippet('popupnewsletter') ?>
 
 
 
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
/**
 * Tpl
 *
 * Super simple template engine
 *
 * @package   Kirby Toolkit
 * @author    Bastian Allgeier <bastian@getkirby.com>
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */
class Tpl extends Silo {
 
  public static $data = array();
 
  public static function load($_file, $_data = array(), $_return = true) {
    if(!file_exists($_file)) return false;
    ob_start();
    extract(array_merge(static::$data, (array)$_data));
    require($_file);
    $_content = ob_get_contents();
    ob_end_clean();
    if($_return) return $_content;
    echo $_content;
  }
 
}
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
kirby
/
component
/
snippet.php
   * Returns a snippet file path by name
   *
   * @param string $name
   * @return string
   */
  public function file($name) {
    return $this->kirby->roots()->snippets() . DS . str_replace('/', DS, $name) . '.php';
  }
 
  /**
   * Renders the snippet with the given data 
   * 
   * @param string $name
   * @param array $data
   * @param boolean $return
   * @return string
   */
  public function render($name, $data = [], $return = false) {
    if(is_object($data)) $data = ['item' => $data];
    return tpl::load($this->kirby->registry->get('snippet', $name), $data, $return);
  }
 
}
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
helpers.php
<?php
 
/**
 * Embeds a snippet from the snippet folder
 *
 * @param string $file
 * @param mixed $data array or object
 * @param boolean $return
 * @return string
 */
function snippet($file, $data = array(), $return = false) {
  return kirby::instance()->component('snippet')->render($file, $data, $return);
}
 
/**
 * Builds a css link tag for relative or absolute urls
 *
 * @param string $url
 * @param string|array $media Either a media string or an array of attributes
 * @return string
 */
function css() {
  return call([kirby::instance()->component('css'), 'tag'], func_get_args());
}
 
/**
 * Builds a script tag for relative or absolute links
 *
 * @param string $src
 * @param boolean|array $async Either true for the async attribute or an array of attributes
 * @return string
 */
function js() {
  return call([kirby::instance()->component('js'), 'tag'], func_get_args());
}
 
/**
 * Global markdown parser shortcut
 *
 * @param string $text
/
home
/
sarahgar
/
site
/
ccnov2
/
site
/
templates
/
home.php
<?php snippet('header') ?>
 
<?php 
    $projets = $site->index()->filterBy('template', 'in', ['default', 'atelier', 'accueil', 'maud']);
    $col1 = "";
    $col2 = "";
    $col3 = "";
    $url1;
    $url2;
    $url3;
    foreach($projets as $projet):
        $project = $site->page($projet);
        $url = $project->url();
        foreach($project->dates()->toStructure() as $date):
            if($date->home()->isNotEmpty()):
                if($date->home() == "col1"):
                    $project1 = $project;
                    $col1 = $date;
                    $url1 = $url;
                elseif($date->home() == "col2"):
                    $project2 = $project;
                    $col2 = $date;
                    $url2 = $url;
                else:
                    $project3 = $project;
                    $col3 = $date;
                    $url3 = $url;
                endif;
                endif;
        endforeach;
    endforeach;
 
?>
 
 
<div>
    <?php snippet('menu') ?>
    <div class="big-image-wrapper image-wrapper">
        <img src="<?php echo $page->homeImage()->toFile()->url()?>" alt="CCNO">
    </div> 
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
vendor
/
getkirby
/
toolkit
/
lib
/
tpl.php
/**
 * Tpl
 *
 * Super simple template engine
 *
 * @package   Kirby Toolkit
 * @author    Bastian Allgeier <bastian@getkirby.com>
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */
class Tpl extends Silo {
 
  public static $data = array();
 
  public static function load($_file, $_data = array(), $_return = true) {
    if(!file_exists($_file)) return false;
    ob_start();
    extract(array_merge(static::$data, (array)$_data));
    require($_file);
    $_content = ob_get_contents();
    ob_end_clean();
    if($_return) return $_content;
    echo $_content;
  }
 
}
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
kirby
/
component
/
template.php
    if($template instanceof Page) {
      $page = $template;
      $file = $page->templateFile();
      $data = $this->data($page, $data);
    } else {
      $file = $template;
      $data = $this->data(null, $data);
    }
 
    // check for an existing template
    if(!file_exists($file)) {
      throw new Exception('The template could not be found');
    }
 
    // merge and register the template data globally
    $tplData = tpl::$data;
    tpl::$data = array_merge(tpl::$data, $data);
 
    // load the template
    $result = tpl::load($file, null, $return);
 
    // reset the template data
    tpl::$data = $tplData;
 
    return $result;
 
  }
 
}
 
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
kirby.php
      }
 
      return $template;
 
    }
 
    // return a fresh template
    return $this->template($page, $data);
 
  }
 
  /**
   * Template configuration
   *
   * @param Page $page
   * @param array $data
   * @return string
   */
  public function template(Page $page, $data = array()) {
    return $this->component('template')->render($page, $data);
  }
 
  public function request() {
    if(!is_null($this->request)) return $this->request;
    return $this->request = new Request($this);
  }
 
  public function router() {
    return $this->router;
  }
 
  public function route() {
    return $this->route;
  }
 
  /**
   * Starts the router, renders the page and returns the response
   *
   * @return mixed
   */
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
kirby.php
        }
 
      }
 
      // try to fetch the template from cache
      $template = $this->cache()->get($cacheId);
 
      // fetch fresh content if the cache is empty
      if(empty($template)) {
        $template = $this->template($page, $data);
        // store the result for the next round
        $this->cache()->set($cacheId, $template);
      }
 
      return $template;
 
    }
 
    // return a fresh template
    return $this->template($page, $data);
 
  }
 
  /**
   * Template configuration
   *
   * @param Page $page
   * @param array $data
   * @return string
   */
  public function template(Page $page, $data = array()) {
    return $this->component('template')->render($page, $data);
  }
 
  public function request() {
    if(!is_null($this->request)) return $this->request;
    return $this->request = new Request($this);
  }
 
  public function router() {
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
kirby
/
component
/
response.php
 * @link      http://getkirby.com
 * @copyright Bastian Allgeier
 * @license   http://getkirby.com/license
 */
class Response extends \Kirby\Component {
 
  /**
   * Builds and return the response by various input
   * 
   * @param mixed $response
   * @return mixed
   */
  public function make($response) {
 
    if(is_string($response)) {
      return $this->kirby->render(page($response));
    } else if(is_array($response)) {
      return $this->kirby->render(page($response[0]), $response[1]);
    } else if(is_a($response, 'Page')) {
      return $this->kirby->render($response);      
    } else if(is_a($response, 'Response')) {
      return $response;
    } else {
      return null;
    }
 
  }
 
}
/
home
/
sarahgar
/
site
/
ccnov2
/
kirby
/
kirby.php
    // check for a valid route
    if(is_null($this->route)) {
      header::status('500');
      header::type('json');
      die(json_encode(array(
        'status'  => 'error',
        'message' => 'Invalid route or request method'
      )));
    }
 
    // call the router action with all arguments from the pattern
    $response = call($this->route->action(), $this->route->arguments());
 
    // load all language variables
    // this can only be loaded once the router action has been called
    // otherwise the current language is not yet available
    $this->localize();
 
    // build the response
    $this->response = $this->component('response')->make($response);
 
    // store the current language in the session
    if(
        $this->option('language.detect') &&
        $this->site()->multilang() &&
        $this->site()->language()
      ) {
      s::set('kirby_language', $this->site()->language()->code());
    }
 
    return $this->response;
 
  }
 
  /**
   * Register a new hook
   *
   * @param string/array $hook The name of the hook
   * @param closure $callback
   */
/
home
/
sarahgar
/
site
/
ccnov2
/
index.php
<?php
 
define('DS', DIRECTORY_SEPARATOR);
 
// load kirby
require(__DIR__ . DS . 'kirby' . DS . 'bootstrap.php');
 
// check for a custom site.php
if(file_exists(__DIR__ . DS . 'site.php')) {
  require(__DIR__ . DS . 'site.php');
} else {
  $kirby = kirby();
}
 
// render
echo $kirby->launch();

Environment & details:

Key Value
Kirby Toolkit v2.5.13
Kirby CMS v2.5.13
empty
empty
empty
empty
empty
Key Value
PATH /usr/local/bin:/usr/bin:/bin
APP_ENGINE phpcgi
APP_ENGINE_VERSION 7.3
ENVIRONMENT production
UNIQUE_ID XtJvasvGO2-ubBeJhVVIHgAAAIw
GEOIP_COUNTRY_CODE US
GEOIP_COUNTRY_NAME United States
GEOIP_REGION VA
GEOIP_CITY Ashburn
GEOIP_DMA_CODE 511
GEOIP_AREA_CODE 703
GEOIP_LATITUDE 39.048100
GEOIP_LONGITUDE -77.472801
SCRIPT_URL /ccnov2/
SCRIPT_URI http://site.sarahgarcin.com/ccnov2/
CFG_CLUSTER cluster010
HTTP_HOST site.sarahgarcin.com
HTTP_X_PREDICTOR 1
HTTP_X_FORWARDED_FOR 18.204.227.117
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT_ENCODING br,gzip
HTTP_REMOTE_PORT 53508
HTTP_X_FORWARDED_PORT 80
HTTP_X_FORWARDED_PROTO http
HTTP_X_REMOTE_PORT 44154
HTTP_X_REMOTE_IP 51.75.119.9
HTTP_X_REMOTE_PROTO http
HTTP_FORWARDED for=51.75.119.9; proto=http; host=site.sarahgarcin.com
HTTP_REMOTE_IP 18.204.227.117
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME site.sarahgarcin.com
SERVER_ADDR 51.83.11.55
SERVER_PORT 80
REMOTE_ADDR 18.204.227.117
DOCUMENT_ROOT /home/sarahgar/site
SERVER_ADMIN postmaster@site.sarahgarcin.com
SCRIPT_FILENAME /home/sarahgar/site/ccnov2/index.php
REMOTE_PORT 19744
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /ccnov2/
SCRIPT_NAME /ccnov2/index.php
HOME /homez.638/sarahgar
PWD /homez.638/sarahgar/site/ccnov2
UID sarahgar
PHP_SELF /ccnov2/index.php
REQUEST_TIME_FLOAT 1590849386,0681
REQUEST_TIME 1590849386
argv Array ( [0] => index.php )
argc 1
Key Value
PATH /usr/local/bin:/usr/bin:/bin
APP_ENGINE phpcgi
APP_ENGINE_VERSION 7.3
ENVIRONMENT production
UNIQUE_ID XtJvasvGO2-ubBeJhVVIHgAAAIw
GEOIP_COUNTRY_CODE US
GEOIP_COUNTRY_NAME United States
GEOIP_REGION VA
GEOIP_CITY Ashburn
GEOIP_DMA_CODE 511
GEOIP_AREA_CODE 703
GEOIP_LATITUDE 39.048100
GEOIP_LONGITUDE -77.472801
SCRIPT_URL /ccnov2/
SCRIPT_URI http://site.sarahgarcin.com/ccnov2/
CFG_CLUSTER cluster010
HTTP_HOST site.sarahgarcin.com
HTTP_X_PREDICTOR 1
HTTP_X_FORWARDED_FOR 18.204.227.117
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT_ENCODING br,gzip
HTTP_REMOTE_PORT 53508
HTTP_X_FORWARDED_PORT 80
HTTP_X_FORWARDED_PROTO http
HTTP_X_REMOTE_PORT 44154
HTTP_X_REMOTE_IP 51.75.119.9
HTTP_X_REMOTE_PROTO http
HTTP_FORWARDED for=51.75.119.9; proto=http; host=site.sarahgarcin.com
HTTP_REMOTE_IP 18.204.227.117
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME site.sarahgarcin.com
SERVER_ADDR 51.83.11.55
SERVER_PORT 80
REMOTE_ADDR 18.204.227.117
DOCUMENT_ROOT /home/sarahgar/site
SERVER_ADMIN postmaster@site.sarahgarcin.com
SCRIPT_FILENAME /home/sarahgar/site/ccnov2/index.php
REMOTE_PORT 19744
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /ccnov2/
SCRIPT_NAME /ccnov2/index.php
HOME /homez.638/sarahgar
PWD /homez.638/sarahgar/site/ccnov2
UID sarahgar
0. Whoops\Handler\PrettyPageHandler