]> andersk Git - sql-web.git/blobdiff - lib/mitsql.lib.php
session_name set to SQLMITEDU
[sql-web.git] / lib / mitsql.lib.php
index a7dba99057cf9965655869ef65a65cc4cea3beac..519e2d2c16e0b9dec215910ea613cbca7b22f340 100755 (executable)
@@ -10,15 +10,23 @@ require_once('dbaccess.lib.php');
 
 require_once('mitsql.cfg.php');
 require_once('security.lib.php');
+require_once('errorhandler.lib.php');
 
 require_once('display.lib.php');
 
+if (isset($_SERVER['SERVER_NAME'])) {
+       $BASE_URL = 'http'.(isSSL()?'s':'').'://'.$_SERVER['SERVER_NAME'].BASE_URL;
+} else {
+       $BASE_URL = 'http://sql.mit.edu/';
+}
+
 if (isset($_SERVER['REQUEST_URI'])) {
     //$thisPath=pathinfo($_SERVER['REQUEST_URI']);
     //session_set_cookie_params(0, $thisPath['dirname']);
        //$arr = explode('/', $_SERVER['SCRIPT_NAME']);
     //session_set_cookie_params(0, '/'.$arr[1].'/');
-    session_set_cookie_params(0, $BASE_URL);
+       session_name('SQLMITEDU');
+    session_set_cookie_params(0, BASE_URL);
     session_start();
     define('INTERACTIVE', 1);
 } else {
This page took 0.146552 seconds and 4 git commands to generate.