forked from TheKoziTwo/xmr-integration
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.php
68 lines (65 loc) · 3.83 KB
/
install.php
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
<?php
define('MINIMUM_PHP_VERSION','5.3.3');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Install</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Install Steps</h1>
</div>
<p>
<table class="table table-condensed">
<tr class="success"><td colspan="2">Server requirements are: </td></tr>
<tr><th>PHP 5.3.3+</th><td><?php echo (version_compare(MINIMUM_PHP_VERSION,PHP_VERSION) !== 1 ? '<span class="label label-success">OK</span>' : '<span class="label label-danger">Too old version of PHP, you are running '.PHP_VERSION.'<span>');?></td></tr>
<tr><th>MySQLi</th><td><?php echo (function_exists('mysqli_connect') === true ? '<span class="label label-success">OK</span>' : '<span class="label label-danger">mysqli extension is not enabled<span>');?></td></tr>
<tr><th>BCMath</th><td><?php echo (function_exists('bcscale') === true ? '<span class="label label-success">OK</span>' : '<span class="label label-danger">bcmath extension is not enabled<span>');?></td></tr>
<tr><th>PHP Short Tags</th><td><?php echo (ini_get("short_open_tag") ? '<span class="label label-success">OK</span>' : '<span class="label label-danger">short_open_tag is not enabled<span>' )?></td></tr>
</table>
<?php if((function_exists('mysqli_connect') !== true) OR (function_exists('bcscale') !== true) OR ( ! ini_get("short_open_tag")) OR (version_compare(MINIMUM_PHP_VERSION,PHP_VERSION) === 1)) { ?>
<div class="panel panel-danger">
<div class="panel-body"><strong>WARNING!</strong> Your server does not fulfill the requirements, please look into the errors above before proceeding.</div>
</div>
<?php } else { ?>
<div class="panel panel-success">
<div class="panel-body"><strong>Congratulations!</strong> Your server fulfills all the requirements.</div>
</div>
<?php } ?>
</p>
<ol>
<li>Open <strong>config.php</strong> and enter your database details. Please follow the steps below to install.</li>
<pre>
'database' => array(
'hostname' => 'localhost',
'username' => 'your_username',
'password' => 'your_password',
'database' => 'your_database',
),</pre>
<li>Import database.sql into your database</li>
<textarea name="sql" style="width:100%;height:400px;" readonly="readonly"><?php
$handle = @fopen('database.sql','r');
if($handle)
{
$db = fread($handle, filesize('database.sql'));
fclose($handle);
echo $db;
}
?></textarea>
<li>By default the user <strong>admin</strong> is assigned admin rights, sign up with username "admin", use a strong password</li>
<li>You can change admins in <strong>config.php</strong> at any time, e.g if you want user "admin", "jack" and "john" to be admins it should look like this:
<pre>
'admins' => array(
// List all usernames here whom you'd like to assign admin access
'admin','jack','john'
),</pre>
</li>
<li>Change <strong>config.php</strong> base_url, it should usually be set to "/"</li>
<li>Now setup the XMR daemon and wallet, if you are unsure how, you can read how to do that <a href="https://moneroeconomy.com/xmr-integration">https://moneroeconomy.com/xmr-integration</a></li>
</ol>
</div>
</body>
</html>