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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7 <title>Kohana Installation</title>
9 <style type="text/css">
10 body { width: 42em; margin: 0 auto; font-family: sans-serif; font-size: 90%; }
12 #tests table { border-collapse: collapse; width: 100%; }
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; }
28 <h1>Environment Tests</h1>
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>
33 <?php $failed = FALSE ?>
34 <table cellspacing="0">
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>
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>
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>
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>
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>
76 <td class="pass">Pass</td>
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>
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>
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>
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>
113 <?php if (extension_loaded('mbstring')): ?>
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>
119 <td class="pass">Pass</td>
122 <?php else: // check for utf8_[en|de]code when mbstring is not available ?>
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>
128 <td class="pass">Pass</td>
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>
144 <?php if ($failed === TRUE): ?>
145 <p class="fail">Kohana may not work correctly with your environment.</p>
147 <p class="pass">Your environment passed all requirements. Remove or rename the <code>install<?php echo EXT ?></code> file now.</p>