Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Commit

Permalink
fixed cookie problem if itdb installed without the /itdb prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiros Ioannou committed Mar 30, 2012
1 parent 2311a93 commit 15cf915
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion init.php
Expand Up @@ -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'];
Expand Down

0 comments on commit 15cf915

Please sign in to comment.