Permalink
Browse files

fixed cookie problem if itdb installed without the /itdb prefix

  • Loading branch information...
1 parent 2311a93 commit 15cf915517f26636c5305a0775f145ad84f8d3af Spiros Ioannou committed Mar 30, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 init.php
View
@@ -20,11 +20,12 @@
}
//wscriptdir: www relative address of base itdb directory (/itdb)
+//used for cookie setting
$wscriptdir=dirname($_SERVER['SCRIPT_NAME']);
if (basename($wscriptdir)=="php") {
$wscriptdir=preg_replace('#/php$#','',$wscriptdir);
}
-
+if ($wscriptdir=="") $wscriptdir="/"; //itdb installed under /
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$remaddr=$_SERVER['HTTP_X_FORWARDED_FOR'];

0 comments on commit 15cf915

Please sign in to comment.