--- a/busui/common.inc.php
+++ b/busui/common.inc.php
@@ -2,10 +2,13 @@
date_default_timezone_set('Australia/ACT');
$APIurl = "http://localhost:8765";
error_reporting(E_ALL ^ E_NOTICE);
+ // you have to open the session to be able to modify or remove it
+ session_start();
+
function isDebug()
{
- return true;
+ return $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME'];
}
function debug($msg) {
@@ -16,22 +19,28 @@
}
function include_header($pageTitle, $opendiv = true, $geolocate = false) {
+ // this starts the session
+ session_start();
+
// if (isDebug()) // set php error level high
echo '