-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallation.html
117 lines (100 loc) · 4.53 KB
/
installation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<title>Menukaarten-docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="assets/css/stylesheet.css" media="screen,print">
<link rel="stylesheet" href="assets/css/print.css" media="print">
<link rel="stylesheet" type="text/css" href="assets/css/shCore.css" media="screen,print">
<link rel="stylesheet" type="text/css" href="assets/css/shThemeDefault.css" media="screen,print">
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/SyntaxHighlighter.js"></script>
<script type="text/javascript" src="assets/js/build_menu.js"></script>
</head>
<body>
<div id="header-wrapper">
<div id="header">
<h1>Documentation SexyFramework</h1>
<span>Created by Vincent Bremer & Douwe de Haan</span>
</div>
</div>
<div id="container">
<div id="menu-wrapper">
<div id="menu">
<h1>Table of contents</h1>
<ul></ul>
</div>
</div>
<div id="content-wrapper">
<div id="content">
<!-- START CONTENT -->
<h1>Installation</h1>
<p>To setup the application, there are a few actions that should be done, after which the application should work.</p>
<h2>Database Preparations</h2>
<p>First of all, a database and user for that database should be made. This is very important, because without database the application can not work. The name of the database is not very important, it can be anything you choose. Make sure you know the following information before continuing:</p>
<ul>
<li>Database Host (can be 'localhost', an IP-address or an URL)</li>
<li>Database Name</li>
<li>Username</li>
<li>Password</li>
<li>MySQL Port</li>
</ul>
<br />
<p class="note">Note that the MySQL Port is usually set to port 3306, but it could be different. If your application can not connect to the database, please check the credentials. If they are valid, ask your hosting provider what the port is on which MySQL communicates.</p>
<h2>File Preparations</h2>
<p>When the database is setup, it is time to start uploading the files. Upload all the files into the directory you want them. This directory could be the root of your host, or a subdirectory. Make sure you also copy the .htaccess file, which is very important for the application to work.</p>
<h2>Database connection</h2>
<p>To connect the application with the database the database.php file in the config folder should be edited. The file should end up like this:</p>
<pre class="brush: php">
<?php
// Database host
define('DB_HOST', 'hostname');
// Database name
define('DB_NAME', 'databasename');
// Database user
define('DB_USER', 'username');
// Database password
define('DB_PASS', 'password');
// Database port
define('DB_PORT', 3306);
?>
</pre>
<h2>Application settings</h2>
<p>The final step to complete the installation of the application is entering the domain information. If the application is installed in the root of your hosting, this step can be skipped. If it is on a subdomain or in a subfolder, this step has to be completed in order to get the framework started.</p>
<p>If the application is installed in a subfolder, the name of this subfolder should be defined in the BASE variable. Put the name of the subfolder after the / were this is noted.<p>
<p>If the application is installed in a subdomain, the subdomain should be defined where the note says.<p>
<pre class="brush: php">
<?php
// Turn on the debug mode to show SQL queries and disable redirects
define('DEBUG_MODE', 0);
// Set the default template
define('DEFAULT_TEMPLATE', 'dashboard');
define('DEFAULT_CONTROLLER', 'menu');
define('DEFAULT_ACTION', 'index');
if (DEBUG_MODE == 1) {
// Set the error_reporting to show all errors
//error_reporting(E_ALL);
}
else {
// Set the error_reporting to show all errors except notices
error_reporting(E_ALL ^ E_NOTICE);
}
//SUBFOLDER: Set the name of the subfolder after the / if the application is installed in a subfolder.
define('BASE', $_SERVER['HTTP_HOST'].'/');
//SUBDOMAIN: Set the name of the subdomain between the quotes
define('SUBDOMAIN', '');
// Set the base path without an / (for example: www.mywebsite.com/test)
define('BASE_PATH', 'http://'.SUBDOMAIN.BASE);
// Some global variables for a feature we may want to implement
define('DOCROOT', __DIR__.'/');
define('COREPATH', DOCROOT.'../core');
define('APPDATA', COREPATH.'/application');
?>
</pre>
<!-- END CONTENT -->
</div>
</div>
</div>
<script type="text/javascript" src="assets/js/SyntaxHighlighter_settings.js"></script>
</body>
</html>