diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-05 02:08:58 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-05 02:08:58 +0000 |
commit | 75aa0cf62494939224098ca60bbef000b21a3c23 (patch) | |
tree | afefead729f02f8cad938422559932137d57f0ae /install.php | |
parent | 318f913669b63598b1ba1402c492b1751bd32c41 (diff) | |
download | ampache-75aa0cf62494939224098ca60bbef000b21a3c23.tar.gz ampache-75aa0cf62494939224098ca60bbef000b21a3c23.tar.bz2 ampache-75aa0cf62494939224098ca60bbef000b21a3c23.zip |
fixed install script for when your in a subdir
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/install.php b/install.php index 49090bf9..783f2c18 100644 --- a/install.php +++ b/install.php @@ -64,7 +64,9 @@ $username = scrub_in($_REQUEST['local_username']); $password = scrub_in($_REQUEST['local_pass']); $hostname = scrub_in($_REQUEST['local_host']); $database = scrub_in($_REQUEST['local_db']); -$php_self = preg_replace("/^\/(.+\.php)\/?.*/","$1",$_SERVER['PHP_SELF']); +if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } +else { $http_type = "http://"; } +$php_self = $http_type . $_SERVER['HTTP_HOST'] . "/" . preg_replace("/^\/(.+\.php)\/?.*/","$1",$_SERVER['PHP_SELF']); $error = new Error(); /* Catch the Current Action */ |