Live: http://www.hths.mcvsd.org/
#Setup Instructions Start by cloning the repository:
git clone https://github.com/hthswebteam/HTHS-Website.git
Then create a new, empty MySQL database. Run the following SQL code to set up the sessions table:
CREATE TABLE IF NOT EXISTS `sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(45) DEFAULT '0' NOT NULL,
user_agent varchar(120) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text NOT NULL,
PRIMARY KEY (session_id),
KEY `last_activity_idx` (`last_activity`)
);
Then follow one of the following instructions depending if you are deploying for development or for production.
Note: The final step, setting up the database, does not currently work while in production mode due to security concerns. For now, first follow the development mode setup and then proceed with the production mode setup.
-
In
/application/config/
, renamedatabase.sample.php
todatabase.php
and add your database credentials:$db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'username_here'; $db['default']['password'] = 'password_here'; $db['default']['database'] = 'database_name_here';
-
Navigate to
http://localhost/HTHS-Website/migration/
to finish setting up the database.
-
In
/index.php
on line 21 change this:define('ENVIRONMENT', 'development');
to this:
define('ENVIRONMENT', 'production');
-
In
/application/config/production
, renamedatabase.sample.php
todatabase.php
and add your database credentials:$db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'username_here'; $db['default']['password'] = 'password_here'; $db['default']['database'] = 'database_name_here';
-
Again in
/application/config/production
, renameconfig.sample.php
toconfig.php
and add an encryption key on line 237:$config['encryption_key'] = 'encryption_key_here';
-
Navigate to
http://localhost/HTHS-Website/migration/
to finish setting up the database. (does not currently work in production mode, so do this in development mode)