install.php

install.php file properly indented and html tags bug solved - Will Hunting -, 03/15/2009 09:44 pm

Download (4.9 kB)

 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
<head>
4
5
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
7
<title>Kohana Installation</title>
8
9
<style type="text/css">
10
body { width: 42em; margin: 0 auto; font-family: sans-serif; font-size: 90%; }
11
12
#tests table { border-collapse: collapse; width: 100%; }
13
        #tests table th,
14
        #tests table td { padding: 0.2em 0.4em; text-align: left; vertical-align: top; }
15
        #tests table th { width: 12em; font-weight: normal; font-size: 1.2em; }
16
        #tests table tr:nth-child(odd) { background: #eee; }
17
        #tests table td.pass { color: #191; }
18
        #tests table td.fail { color: #911; }
19
                #tests #results { color: #fff; }
20
                #tests #results p { padding: 0.8em 0.4em; }
21
                #tests #results p.pass { background: #191; }
22
                #tests #results p.fail { background: #911; }
23
</style>
24
25
</head>
26
<body>
27
28
<h1>Environment Tests</h1>
29
30
<p>The following tests have been run to determine if Kohana will work in your environment. If any of the tests have failed, consult the <a href="http://docs.kohanaphp.com/installation">documentation</a> for more information on how to correct the problem.</p>
31
32
<div id="tests">
33
        <?php $failed = FALSE ?>
34
        <table cellspacing="0">
35
                <tr>
36
                        <th>PHP Version</th>
37
                        <?php if (version_compare(PHP_VERSION, '5.2', '>=')): ?>
38
                                <td class="pass"><?php echo PHP_VERSION ?></td>
39
                        <?php else: $failed = TRUE ?>
40
                                <td class="fail">Kohana requires PHP 5.2 or newer, this version is <?php echo PHP_VERSION ?>.</td>
41
                        <?php endif ?>
42
                </tr>
43
                <tr>
44
                        <th>System Directory</th>
45
                        <?php if (is_dir(SYSPATH) AND is_file(SYSPATH.'core/Bootstrap'.EXT)): ?>
46
                                <td class="pass"><?php echo SYSPATH ?></td>
47
                        <?php else: $failed = TRUE ?>
48
                                <td class="fail">The configured <code>system</code> directory does not exist or does not contain required files.</td>
49
                        <?php endif ?>
50
                </tr>
51
                <tr>
52
                        <th>Application Directory</th>
53
                        <?php if (is_dir(APPPATH) AND is_file(APPPATH.'config/config'.EXT)): ?>
54
                                <td class="pass"><?php echo APPPATH ?></td>
55
                        <?php else: $failed = TRUE ?>
56
                                <td class="fail">The configured <code>application</code> directory does not exist or does not contain required files.</td>
57
                        <?php endif ?>
58
                </tr>
59
                <tr>
60
                        <th>Modules Directory</th>
61
                        <?php if (is_dir(MODPATH)): ?>
62
                                <td class="pass"><?php echo MODPATH ?></td>
63
                        <?php else: $failed = TRUE ?>
64
                                <td class="fail">The configured <code>modules</code> directory does not exist or does not contain required files.</td>
65
                        <?php endif ?>
66
                </tr>
67
                <tr>
68
                        <th>PCRE UTF-8</th>
69
                        <?php if ( ! @preg_match('/^.$/u', 'ñ')): $failed = TRUE ?>
70
                                <td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with UTF-8 support.</td>
71
                        <?php elseif ( ! @preg_match('/^\pL$/u', 'ñ')): $failed = TRUE ?>
72
                                <td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with Unicode property support.</td>
73
                        <?php else: ?>
74
                                <td class="pass">Pass</td>
75
                        <?php endif ?>
76
                </tr>
77
                <tr>
78
                        <th>Reflection Enabled</th>
79
                        <?php if (class_exists('ReflectionClass')): ?>
80
                                <td class="pass">Pass</td>
81
                        <?php else: $failed = TRUE ?>
82
                                <td class="fail">PHP <a href="http://www.php.net/reflection">reflection</a> is either not loaded or not compiled in.</td>
83
                        <?php endif ?>
84
                </tr>
85
                <tr>
86
                        <th>Filters Enabled</th>
87
                        <?php if (function_exists('filter_list')): ?>
88
                                <td class="pass">Pass</td>
89
                        <?php else: $failed = TRUE ?>
90
                                <td class="fail">The <a href="http://www.php.net/filter">filter</a> extension is either not loaded or not compiled in.</td>
91
                        <?php endif ?>
92
                </tr>
93
                <tr>
94
                        <th>Iconv Extension Loaded</th>
95
                        <?php if (extension_loaded('iconv')): ?>
96
                                <td class="pass">Pass</td>
97
                        <?php else: $failed = TRUE ?>
98
                                <td class="fail">The <a href="http://php.net/iconv">iconv</a> extension is not loaded.</td>
99
                        <?php endif ?>
100
                </tr>
101
                <tr>
102
                        <?php if (extension_loaded('mbstring')): ?>
103
                        <th>Mbstring Not Overloaded</th>
104
                        <?php if (ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING): $failed = TRUE ?>
105
                                <td class="fail">The <a href="http://php.net/mbstring">mbstring</a> extension is overloading PHP's native string functions.</td>
106
                        <?php else: ?>
107
                                <td class="pass">Pass</td>
108
                        <?php endif ?>
109
                </tr>
110
                <tr>
111
                        <th>URI Determination</th>
112
                        <?php if (isset($_SERVER['REQUEST_URI']) OR isset($_SERVER['PHP_SELF'])): ?>
113
                                <td class="pass">Pass</td>
114
                        <?php else: $failed = TRUE ?>
115
                                <td class="fail">Neither <code>$_SERVER['REQUEST_URI']</code> or <code>$_SERVER['PHP_SELF']</code> is available.</td>
116
                        <?php endif ?>
117
                </tr>
118
        </table>
119
120
        <div id="results">
121
                <?php if ($failed === TRUE): ?>
122
                        <p class="fail">Kohana may not work correctly with your environment.</p>
123
                <?php else: ?>
124
                        <p class="pass">Your environment passed all requirements. Remove or rename the <code>install<?php echo EXT ?></code> file now.</p>
125
                <?php endif ?>
126
        </div>
127
128
</div>
129
130
</body>
131
</html>