From 2f8b502bdaf9b9c258916e01195c60708dc2cea2 Mon Sep 17 00:00:00 2001 From: sminnee Date: Mon, 13 Oct 2008 21:53:08 +0000 Subject: [PATCH] BUGFIX #2903 - Fix rewritebase for windows git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@64155 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- install.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.php b/install.php index 7fdcfbc..075a426 100644 --- a/install.php +++ b/install.php @@ -456,9 +456,9 @@ class InstallRequirements { $this->warning($testDetails); } else { list($majorRequested, $minorRequested) = explode('.', $version); - $result = mysql_query('SELECT VERSION()'); - $row=mysql_fetch_row($result); - $version = ereg_replace("([A-Za-z-])", "", $row[0]); + $result = mysql_query('SELECT VERSION()'); + $row=mysql_fetch_row($result); + $version = ereg_replace("([A-Za-z-])", "", $row[0]); list($majorHas, $minorHas) = explode('.', substr(trim($version), 0, 3)); if(($majorHas > $majorRequested) || ($majorHas == $majorRequested && $minorHas >= $minorRequested)) { @@ -804,7 +804,10 @@ PHP function createHtaccess() { $start = "### SILVERSTRIPE START ###\n"; $end = "\n### SILVERSTRIPE END ###"; + $base = dirname($_SERVER['SCRIPT_NAME']); + if(defined('DIRECTORY_SEPARATOR')) $base = str_replace('/',DIRECTORY_SEPARATOR, $base); + if($base != '.') $baseClause = "RewriteBase $base\n"; else $baseClause = "";