<?php
declare(strict_types=1);
if (session_status() === PHP_SESSION_NONE) session_start();
echo "PHP_VERSION = " . PHP_VERSION . "\n";
$inc = __DIR__ . '/../includes/db.php';
echo "includes/db.php: " . (is_file($inc) ? "FOUND" : "MISSING") . "\n";
$mysqli = @new mysqli("localhost","root","","edencamp_edencampus");
if ($mysqli->connect_errno) {
  echo "mysqli connect: FAIL (" . $mysqli->connect_errno . ") " . $mysqli->connect_error . "\n";
} else {
  echo "mysqli connect: OK\n";
  $res = $mysqli->query("SHOW TABLES LIKE 'users'");
  echo "users table: " . ($res && $res->num_rows ? "YES" : "NO") . "\n";
}
