2010-02-10 04:29:25 +01:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
< html >
2009-06-18 01:14:40 +02:00
< head >
2010-03-03 01:51:06 +01:00
< title > SilverStripe CMS / Framework Installation< / title >
2010-02-10 04:29:25 +01:00
< meta http-equiv = "Content-type" content = "text/html; charset=utf-8" >
2010-03-15 07:41:38 +01:00
< script type = "text/javascript" src = "sapphire/thirdparty/jquery/jquery.js" > < / script >
< script type = "text/javascript" src = "sapphire/dev/install/install.js" > < / script >
2010-02-10 04:29:25 +01:00
< link rel = "stylesheet" type = "text/css" href = "themes/blackcandy/css/layout.css" >
< link rel = "stylesheet" type = "text/css" href = "themes/blackcandy/css/typography.css" >
< link rel = "stylesheet" type = "text/css" href = "themes/blackcandy/css/form.css" >
< link rel = "stylesheet" type = "text/css" href = "sapphire/dev/install/install.css" >
< link rel = "shortcut icon" href = "favicon.ico" >
2009-06-18 01:14:40 +02:00
< / head >
< body >
< div id = "BgContainer" >
< div id = "Container" >
< div id = "Header" >
2010-03-03 01:51:06 +01:00
< h1 > SilverStripe CMS / Framework Installation< / h1 >
2009-06-18 01:14:40 +02:00
< p > Version <?php echo $silverstripe_version; ?> < / p >
< / div >
< div id = "Navigation" > < / div >
< div class = "clear" > <!-- --> < / div >
< div id = "Layout" >
< div class = "typography" >
2010-03-18 02:11:19 +01:00
< p > Thanks for choosing to use SilverStripe! Please follow the instructions below to get you up and running.< / p >
2009-06-18 01:14:40 +02:00
< form action = "install.php" method = "post" >
<?php if(isset($hasErrorOtherThanDatabase)) { ?>
< p class = "error" >
2010-02-10 04:29:25 +01:00
You aren't currently able to install the software. Please < a href = "#requirements" > see below< / a > for details.< br >
2009-11-05 04:07:17 +01:00
If you are having problems meeting the requirements, see the < a href = "http://doc.silverstripe.org/doku.php?id=server-requirements" > server requirements wiki page< / a > .
2009-06-18 01:14:40 +02:00
< / p >
<?php } else { ?>
<?php if($req->hasWarnings()) { ?>
< p class = "warning" >
There are some issues that we recommend you look at before installing, however, you are still able to install the software.
2010-02-10 04:29:25 +01:00
Please see below for details.< br >
2009-11-05 04:07:17 +01:00
If you are having problems meeting the requirements, see the < a href = "http://doc.silverstripe.org/doku.php?id=server-requirements" > server requirements wiki page< / a > .
2009-06-18 01:14:40 +02:00
< / p >
2010-02-24 23:34:53 +01:00
<?php } else if(!$dbReq->hasErrors() && !$adminReq->hasErrors()) { ?>
2010-02-10 05:07:47 +01:00
< p class = "good" > You're ready to install!< / p >
<?php } ?>
2010-02-24 23:34:53 +01:00
<?php if($dbReq->hasErrors()) { ?>
< p class = "error" >
2010-03-05 22:23:42 +01:00
The database details don't appear to be correct. Please < a href = "#database_credentials" > review and correct< / a > before installing.
2010-02-24 23:34:53 +01:00
< / p >
<?php } ?>
<?php if($adminReq->hasErrors()) { ?>
< p class = "error" >
2010-03-03 23:02:57 +01:00
Please < a href = "#AdminAccount" > enter an email address and password< / a > for the default administrator account before installing.
2010-02-24 23:34:53 +01:00
< / p >
<?php } ?>
2010-03-18 02:11:19 +01:00
< p id = "stats-container" >
< input type = "checkbox" id = "stats" name = "stats" checked = "checked" >
< label for = "stats" > Send information about my webserver to silverstripe.org< br / >
< small > (anonymized version information, used for statistical purposes)< / small >
< / label > < p >
2009-06-18 01:14:40 +02:00
<?php if($alreadyInstalled) { ?>
< p class = "warning" >
< strong > Note:< / strong > It seems as though SilverStripe is already installed here. If you ask me to install, I will overwrite
the < strong > .htaccess< / strong > and < strong > mysite/_config.php< / strong > files.
2010-02-10 04:29:25 +01:00
< br >
2010-03-15 07:41:38 +01:00
< input type = "checkbox" id = "ReIn" name = "force_reinstall" > < label for = "ReIn" > That's okay, please re-install SilverStripe and overwrite these files.< / label >
2009-06-18 01:14:40 +02:00
< / p >
<?php } ?>
2010-02-10 05:07:47 +01:00
2009-06-18 01:14:40 +02:00
< p >
<?php if($alreadyInstalled) { ?>
2010-03-15 07:41:38 +01:00
< input id = "install_button" type = "submit" disabled = "disabled" class = "action" name = "go" value = "Install SilverStripe" >
2009-06-18 01:14:40 +02:00
<?php } else { ?>
2010-03-15 07:41:38 +01:00
< input id = "install_button" type = "submit" class = "action" name = "go" value = "Install SilverStripe" >
2009-06-18 01:14:40 +02:00
<?php } ?>
< span id = "saving_top" style = "display: none" >
2010-02-10 04:29:25 +01:00
< img src = "cms/images/network-save.gif" >
2009-06-18 01:14:40 +02:00
(this will take a minute or so)
< / span >
< / p >
2010-03-18 02:11:19 +01:00
< h4 class = "sectionHeading" > Theme< / h4 >
< p > You can change the theme or < a href = "http://silverstripe.org/themes" > download< / a > another from the SilverStripe website after installation.< / p >
< ul id = "Themes" >
< li > < input type = "radio" name = "template" value = "blackcandy" id = "BlackCandy" < ? php if ( ! isset ( $ _POST [ ' template ' ] ) | | $ _POST [ ' template ' ] = = ' blackcandy ' ) { ? > checked="checked"<?php }?> >< label for = "BlackCandy" > < a href = "http://silverstripe.org/blackcandy/" > BlackCandy< / a > - our default theme ready to use.< / label > < / li >
< li > < input type = "radio" name = "template" value = "tutorial" id = "EmptyTemplate" < ? php if ( isset ( $ _POST [ ' template ' ] ) & & $ _POST [ ' template ' ] = = ' tutorial ' ) { ? > checked="checked"<?php }?> >< label for = "EmptyTemplate" > Empty template - ready to begin the < a href = "http://doc.silverstripe.org/doku.php?id=tutorials" target = "_blank" > tutorial< / a > .< / label > < / li >
< / ul >
2009-06-18 01:14:40 +02:00
<?php } ?>
2010-02-10 04:22:41 +01:00
< h4 class = "sectionHeading" > Database< / h4 >
< div id = "database_credentials" class = "section" >
2010-03-12 00:02:22 +01:00
< p id = "dbHelp" class = "helpText" >
SilverStripe stores its content in a relational SQL database. Please provide the username and password to connect to the server here.
If this account has permission to create databases, then we will create the database for you; otherwise, you must give the name of a
database that already exists.< br > < br >
< strong > Other databases:< / strong > < br >
Databases in the list that are greyed out cannot currently be used. Click on them for more information and possible remedies.
< / p >
2010-03-18 02:11:19 +01:00
< div class = "fields" >
2010-03-12 00:02:22 +01:00
< div class = "field" >
< ul id = "database_selection" >
< ?php
foreach($databaseClasses as $class => $details) {
2010-03-15 07:41:38 +01:00
$checked = ($databaseConfig['type'] == $class || $type == $class) ? ' checked="checked"' : '';
2010-03-12 00:02:22 +01:00
$disabled = $help = '';
if($usingEnv) {
// All are disabled by default when environment is used
$disabled = 'disabled="disabled"';
// If SS_DATABASE_CLASS is specified, check the database in the list
if(defined('SS_DATABASE_CLASS') & & SS_DATABASE_CLASS == $class) {
$checked = ' checked="checked"';
}
} else {
$disabled = !$details['supported'] || !$details['hasModule'] ? 'notavailable="true"' : '';
if ($disabled) {
if (!$details['supported'] & & !$details['hasModule']) {
$help = 'PHP does not have the required extension, and SilverStripe does not have the correct module installed';
$helpText = '< li style = "width:auto" > '.$details['missingExtensionText'].'< / li > ';
$helpText .= '< li style = "width:auto" > '.$details['missingModuleText'].'< / li > ';
} else if ($details['supported'] & & !$details['hasModule']) {
$help = 'PHP has the required extension, but SilverStripe is missing the module';
$helpText = '< li style = "width:auto" > '.$details['missingModuleText'].'< / li > ';
} else if (!$details['supported'] & & $details['hasModule']) {
$help = 'SilverStripe has the module installed, but PHP is missing the required extension';
$helpText = '< li style = "width:auto" > '.$details['missingExtensionText'].'< / li > ';
}
$help .= "< ul > $helpText< / ul > ";
2010-03-09 03:39:04 +01:00
}
}
2010-03-12 00:02:22 +01:00
echo "< li > ";
echo "< input id = \"$class\" class = \"databaseClass\" type = \"radio\" name = \"db[type]\" value = \"$class\"$checked $ disabled > ";
2010-03-12 03:12:48 +01:00
echo "< label class = \"left\" " . ( $ help | | $ disabled ? ' style = "font-weight:normal;color:grey" ' : ' style = "color:green" ' ) . " for = \"$class\" > {$details['title']}< / label > ";
2010-03-12 00:02:22 +01:00
if ($help) {
echo '< div class = "error databaseError" > '.$help.'< / div > ';
}
2010-03-15 07:41:38 +01:00
// generate db-specific config fields
echo '< div class = "dbfields" > ';
if(isset($details['fields'])) foreach($details['fields'] as $fieldName => $fieldSpec) {
$fieldTitle = $fieldSpec['title'];
// values
$defaultValue = (isset($fieldSpec['default'])) ? $fieldSpec['default'] : null;
if($usingEnv & & isset($fieldSpec['envVar']) & & defined($fieldSpec['envVar'])) {
$value = constant($fieldSpec['envVar']);
} else {
2010-03-16 00:54:55 +01:00
$value = (isset($databaseConfig[$fieldName])) ? $databaseConfig[$fieldName] : $defaultValue;
2010-03-15 07:41:38 +01:00
}
// attributes
$attrs = array(
'id' => "db_{$class}_{$fieldName}",
'class' => 'text',
'type' => 'text',
'name' => "db[$class][$fieldName]",
'value' => $value,
);
if($usingEnv & & isset($fieldSpec['envVar']) & & defined($fieldSpec['envVar'])) {
$attrs['disabled'] = 'disabled';
}
if(isset($fieldSpec['envVar'])) {
$attrs['class'] .= ' configured-by-env';
}
$attrHTML = '';
foreach($attrs as $attrName => $attrValue) $attrHTML .= "$attrName=\"$attrValue\" ";
if(isset($fieldSpec['attributes'])) $attrs = array_merge($attrs, $fieldSpec['attributes']);
// html
echo "< div class = \"field\" > ";
echo "< label for = \"db_$class_$fieldName\" > $fieldTitle:< / label > ";
echo "< span class = \"middleColumn\" > ";
echo "< input $ attrHTML > ";
echo "< / span > ";
echo "< / div > ";
}
echo '< / div > ';
2010-03-12 00:02:22 +01:00
echo "< / li > ";
2010-02-10 06:02:34 +01:00
}
2010-03-12 00:02:22 +01:00
?>
< / ul >
2010-03-18 02:11:19 +01:00
<?php if($envFileExists) { ?>
< div id = "use_environment_field" class = "field" >
< input id = "use_environment" type = "checkbox" name = "useEnv" < ? php if ( $ usingEnv ) echo " checked = \"checked\"" ? > >
< label for = "use_environment" > Use _ss_environment file for configuration (< a href = "http://doc.silverstripe.org/doku.php?id=environment-management" target = "_blank" > ?< / a > )< / label >
< / div >
<?php } ?>
2010-03-12 00:02:22 +01:00
< / div >
2010-03-15 07:41:38 +01:00
2010-03-12 00:02:22 +01:00
< div class = "action" >
< input type = "submit" class = "action" value = "Re-check requirements" >
< / div >
2010-02-10 04:52:08 +01:00
< / div >
2010-02-10 04:22:41 +01:00
< / div >
2010-02-10 04:52:08 +01:00
2010-02-12 04:15:35 +01:00
< div class = "clear" > <!-- --> < / div >
2010-02-10 04:22:41 +01:00
<?php $dbReq->showTable("Database Configuration"); ?>
2010-02-10 04:52:08 +01:00
2010-03-18 02:11:19 +01:00
< h4 class = "sectionHeading" > CMS Admin Account< / h4 >
2010-02-10 04:22:41 +01:00
< div id = "AdminAccount" class = "section" >
2010-03-12 00:02:22 +01:00
< p id = "adminAcc" class = "helpText" >
2010-03-18 02:11:19 +01:00
We will set up the first administrator account for you automatically. You can change these details later in the "Security" section within the CMS.
2010-03-12 00:02:22 +01:00
< / p >
< div class = "fields" >
< div class = "field" >
2010-03-18 02:11:19 +01:00
< label for = "admin_username" > Email:< / label >
2010-03-12 00:02:22 +01:00
< span class = "middleColumn" >
2010-03-15 07:41:38 +01:00
< input type = "text" class = "text configured-by-env" name = "admin[username]" id = "admin_username" value = "<?php echo $adminConfig['username']; ?>" < ? php if ( $ usingEnv & & defined ( ' SS_DEFAULT_ADMIN_USERNAME ' ) ) echo ' disabled = "disabled" ' ? > >
2010-03-12 00:02:22 +01:00
< / span >
< / div >
< div class = "field" >
2010-03-18 02:11:19 +01:00
< label for = "admin_password" > Password:< / label >
2010-03-12 00:02:22 +01:00
< span class = "middleColumn" >
2010-03-15 07:41:38 +01:00
< input type = "password" class = "text configured-by-env" name = "admin[password]" id = "admin_password" value = "<?php echo $adminConfig['password']; ?>" < ? php if ( $ usingEnv & & defined ( ' SS_DEFAULT_ADMIN_PASSWORD ' ) ) echo ' disabled = "disabled" ' ? > >
2010-03-12 00:02:22 +01:00
< / span >
< / div >
< div class = "field" >
2010-03-18 02:11:19 +01:00
< label for = "admin_firstname" > First name:< / label >
2010-03-12 00:02:22 +01:00
< span class = "middleColumn" >
< input type = "text" class = "text" name = "admin[firstname]" id = "admin_firstname" value = "<?php echo $adminConfig['firstname']; ?>" >
< / span >
< / div >
< div class = "field" >
2010-03-18 02:11:19 +01:00
< label for = "admin_surname" > Surname:< / label >
2010-03-12 00:02:22 +01:00
< span class = "middleColumn" >
< input type = "text" class = "text" name = "admin[surname]" id = "admin_surname" value = "<?php echo $adminConfig['surname']; ?>" >
< / span >
< / div >
2010-02-24 23:34:53 +01:00
< / div >
2010-02-10 04:22:41 +01:00
< / div >
2010-03-10 03:04:10 +01:00
< h4 class = "sectionHeading" > Server configuration< / h4 >
2010-03-12 00:02:22 +01:00
< div id = "devSection" class = "section" >
< div class = "fields" >
< div class = "field" >
< label for = "devsites" > Development servers:< / label >
< span class = "middleColumn" >
2010-03-15 07:41:38 +01:00
< textarea name = "devsites" id = "devsites" class = "configured-by-env" rows = "5" cols = "10" >
2010-03-12 04:36:02 +01:00
< ?php if(@$_POST['devsites']) echo $_POST['devsites'];
else echo 'localhost
127.0.0.1'; ?>< / textarea >
2010-03-12 00:02:22 +01:00
< / span >
< / div >
2010-03-10 03:04:10 +01:00
< / div >
2010-03-12 00:02:22 +01:00
< p id = "devHelp" class = "helpText" >
SilverStripe allows you to run a site in < a href = "http://doc.silverstripe.org/doku.php?id=configuration" > development mode< / a > .
This shows all error messages in the web browser instead of emailing them to the administrator, and allows
the database to be built without logging in as administrator. Please enter the host/domain names for servers
you will be using for development.
< / p >
2010-02-10 04:22:41 +01:00
< / div >
2010-03-12 00:02:22 +01:00
< div id = "localeSection" class = "section" >
< div class = "fields" >
< div class = "field" >
< label for = "locale" > Default language:< / label >
< span class = "middleColumn" >
< select name = "locale" id = "locale" >
< ?php
$selectedLocale = isset($_POST['locale']) ? $_POST['locale'] : $defaultLocale;
foreach($locales as $code => $details) {
$selected = $code == $selectedLocale ? ' selected="true"' : '';
echo "< option $ selected value = \"$code\" > {$details[0]} - {$details[1]}< / option > \n";
}
?>
< / select >
< / span >
< / div >
< / div >
< p id = "localeHelp" class = "helpText" >
Determines the default "locale" settings (for dates, currencies, etc.),
as well as setting the default language of the CMS interface.
This can be customized for any CMS user.
< br / >
Caution: Not all aspects of the interface might be localized yet.
< / p >
< / div >
2009-06-18 01:14:40 +02:00
< h4 id = "requirements" > Requirements< / h4 >
2010-02-10 04:22:41 +01:00
<?php $req->showTable(); ?>
2010-03-18 02:11:19 +01:00
< p >
Read more about our < a href = "http://doc.silverstripe.org/doku.php?id=server-requirements" target = "_blank" > server requirements< / a > .
< / p >
< div class = "action" >
< input type = "submit" class = "action" value = "Re-check requirements" >
< / div >
2009-06-18 01:14:40 +02:00
< / form >
< / div >
< / div >
< div class = "clear" > <!-- --> < / div >
< / div >
< div id = "Footer" >
< div class = "footerTop" > <!-- --> < / div >
2010-03-03 01:51:06 +01:00
< p > < a href = "http://www.silverstripe.org" > SilverStripe Open Source CMS / Framework< / a > | Copyright © 2010 SilverStripe Limited< / p >
2009-06-18 01:14:40 +02:00
< / div >
< / div >
< / body >
2010-02-11 09:45:59 +01:00
< / html >