Initial Kohana install
[speedfreak] / Server / install.php
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 ( !function_exists('preg_match')): $failed = TRUE ?>
70 <td class="fail"><a href="http://php.net/pcre">PCRE</a> support is missing.</td>
71 <?php elseif ( ! @preg_match('/^.$/u', 'ñ')): $failed = TRUE ?>
72 <td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with UTF-8 support.</td>
73 <?php elseif ( ! @preg_match('/^\pL$/u', 'ñ')): $failed = TRUE ?>
74 <td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with Unicode property support.</td>
75 <?php else: ?>
76 <td class="pass">Pass</td>
77 <?php endif ?>
78 </tr>
79 <tr>
80 <th>Reflection Enabled</th>
81 <?php if (class_exists('ReflectionClass')): ?>
82 <td class="pass">Pass</td>
83 <?php else: $failed = TRUE ?>
84 <td class="fail">PHP <a href="http://www.php.net/reflection">reflection</a> is either not loaded or not compiled in.</td>
85 <?php endif ?>
86 </tr>
87 <tr>
88 <th>Filters Enabled</th>
89 <?php if (function_exists('filter_list')): ?>
90 <td class="pass">Pass</td>
91 <?php else: $failed = TRUE ?>
92 <td class="fail">The <a href="http://www.php.net/filter">filter</a> extension is either not loaded or not compiled in.</td>
93 <?php endif ?>
94 </tr>
95 <tr>
96 <th>Iconv Extension Loaded</th>
97 <?php if (extension_loaded('iconv')): ?>
98 <td class="pass">Pass</td>
99 <?php else: $failed = TRUE ?>
100 <td class="fail">The <a href="http://php.net/iconv">iconv</a> extension is not loaded.</td>
101 <?php endif ?>
102 </tr>
103
104 <tr>
105 <th>SPL Enabled</th>
106 <?php if (function_exists('spl_autoload_register')): ?>
107 <td class="pass">Pass</td>
108 <?php else: $failed = TRUE ?>
109 <td class="fail"><a href="http://php.net/spl">SPL</a> is not enabled.</td>
110 <?php endif ?>
111 </tr>
112
113 <?php if (extension_loaded('mbstring')): ?>
114 <tr>
115 <th>Mbstring Not Overloaded</th>
116 <?php if (ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING): $failed = TRUE ?>
117 <td class="fail">The <a href="http://php.net/mbstring">mbstring</a> extension is overloading PHP's native string functions.</td>
118 <?php else: ?>
119 <td class="pass">Pass</td>
120 </tr>
121 <?php endif ?>
122 <?php else: // check for utf8_[en|de]code when mbstring is not available ?>
123 <tr>
124 <th>XML support</th>
125 <?php if ( ! function_exists('utf8_encode')): $failed = TRUE ?>
126 <td class="fail">PHP is compiled without <a href="http://php.net/xml">XML</a> support, thus lacking support for <code>utf8_encode()</code>/<code>utf8_decode()</code>.</td>
127 <?php else: ?>
128 <td class="pass">Pass</td>
129 <?php endif ?>
130 </tr>
131 <?php endif ?>
132 <tr>
133 <th>URI Determination</th>
134 <?php if (isset($_SERVER['REQUEST_URI']) OR isset($_SERVER['PHP_SELF'])): ?>
135 <td class="pass">Pass</td>
136 <?php else: $failed = TRUE ?>
137 <td class="fail">Neither <code>$_SERVER['REQUEST_URI']</code> or <code>$_SERVER['PHP_SELF']</code> is available.</td>
138 <?php endif ?>
139 </tr>
140
141 </table>
142
143 <div id="results">
144 <?php if ($failed === TRUE): ?>
145 <p class="fail">Kohana may not work correctly with your environment.</p>
146 <?php else: ?>
147 <p class="pass">Your environment passed all requirements. Remove or rename the <code>install<?php echo EXT ?></code> file now.</p>
148 <?php endif ?>
149 </div>
150
151 </div>
152
153 </body>
154 </html>