<?php
declare(strict_types=1);
ini_set('display_errors','1');
error_reporting(E_ALL);

require_once __DIR__ . '/lib/db.php';
start_session();

if (!isset($_SESSION['ping'])) $_SESSION['ping'] = 0;
$_SESSION['ping']++;

header('Content-Type: text/plain; charset=utf-8');
echo "URL = " . ($_SERVER['REQUEST_URI'] ?? '') . PHP_EOL;
echo "session_id = " . session_id() . PHP_EOL;
echo "ping = " . $_SESSION['ping'] . PHP_EOL;
echo "cookie_path(cfg) = " . (cfg()['cookie_path'] ?? '-') . PHP_EOL;
echo "session_save_path = " . session_save_path() . PHP_EOL;
