Skip to content

Commit

Permalink
Hopefully fixed a few problems with the installer on Windows. THT is …
Browse files Browse the repository at this point in the history
…not meant to be run on Windows but I bet some people are developing/testing it on their Windows-based localhost servers. This has not yet been tested on non-Windows systems.
  • Loading branch information
kmark committed Jun 10, 2010
1 parent 7b26d3a commit 426e37f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions install/index.php
Expand Up @@ -17,8 +17,15 @@
* the document root. This file must be called directly and
* directly only.
*/
$compare = explode($_SERVER["DOCUMENT_ROOT"], __FILE__);
if($compare[1] !== $_SERVER["PHP_SELF"]) {
if(strtoupper(substr(PHP_OS, 0, 3)) === "WIN") {
$file = str_replace("\\", "/", __FILE__);
}
else {
$file = __FILE__;
}
$compare = explode($_SERVER["DOCUMENT_ROOT"], $file);

if("/" . $compare[1] !== $_SERVER["PHP_SELF"]) {
die("You can only run the install from the <em>".__FILE__."</em> file.");
}

Expand Down

0 comments on commit 426e37f

Please sign in to comment.