install.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Koseven Installation</title>
  8. <meta name="title" content="Koseven Installation">
  9. <meta name="description" content="The following tests have been run to determine if Koseven will work in your environment.">
  10. <meta name="author" content="Koseven Team">
  11. <style>
  12. body {
  13. margin: 0;
  14. background-color: #efefef;
  15. font-family: 'Arial', sans-serif;
  16. }
  17. .container {
  18. max-width: 800px;
  19. margin: 10px auto;
  20. background: #fff;
  21. padding: 20px 15px;
  22. border-radius: 12px;
  23. }
  24. table {
  25. margin: 20px 0;
  26. }
  27. h1,
  28. th {
  29. margin: 5px 0;
  30. color: #2f2f2f;
  31. }
  32. p,
  33. td {
  34. margin: 10px 0;
  35. color: #383838;
  36. }
  37. a,
  38. a:visited {
  39. color: #3195f0;
  40. text-decoration: none;
  41. }
  42. th {
  43. text-align: left;
  44. width: 30%;
  45. }
  46. td,
  47. th {
  48. padding: 5px 0;
  49. }
  50. .logo {
  51. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAoCAMAAABevo0zAAABmFBMVEUAAADs7Ozt7e3s7Ozs7Ozs7Ozs7Ozs7Ozt7e3s7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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Ji63PQJL161/dSMRbZ9hXnLyRJl39bzM7HUZvoDWps9T11AvETC18Z5QLdykd+hlB4SGA0bl+6QMyv7iXBMMvpIIOz4OBDusTWpYuutzSpiNhgOULctRBcR3iU2LvYSCEwJABxN2tAIagqr1v8bUlyWlpD2PCEJUyjw7RPT7VrvA759WueNFhXHHwgIkH0CCX2Ft1DgCxDYIgAJLjIjB/4lkiuR0Mvh42XM4GOYaxsEYDucZHJ29yhH8OlDsLq5yog3KPAHnJL9QnCRu71+m4eAG2h9jBN2Id/VcZwLU1bgToFotid5sIDNTEoh4hEag9bgBkW+/B0U+BwEHiRCqMknJBqi/p6QztQpkV5SD3iKfOMwWjcT3z6oyQM8VbM1XAwhISsshvgKuybbh3zPQGArEZ4GwjKWcwaZ1WeXcBianI844LszCCt6lyAcA0J0nhwb4jDOYSg5y+o69vQvR2CbPnVWxIo8SZGzAVK/M35riuowSCdIFVDgC2ewViCDiBRMV/z3X+SH0Elif6RccE/y/FpeBIFHmBB2PEdFll3UkGt89BjcM0vOoO7QJ5hvB5yTL1zOXnfafPX5clUJWMAS9y3A2EozYRoIcapEH6Scp1wVsVVcFC6jwJ80V0FgUjC2wbhGWbkij9EIYj/mYvqI7+kyji0zV/P2+sRotUUuRjxjqhRdhtBZ/hUNelfsgas4U2EJblNbhIMD9iSXyhnAnHk/gesM9ttYJoBrSNjzAGybocVpvH7chLkqXDTpUdkYefhbWjUXpbH1B3U3rwEUyDlsa8yX9aNHtfauXu0okKFjjJeyMWcKZzup9UD8UYtHeLz+NszWLuc6PGDfHhVHvRvzbuEjcUAztmgX28Teppi9w/5kNGsGXrd88EeE+72waf0oHTm0f4/9pNia5i8QdvHxF5+c4F+bFmujAAAAAElFTkSuQmCC);
  52. width: 80px;
  53. height: 40px;
  54. float: right;
  55. }
  56. .pass {
  57. color: #155724;
  58. }
  59. .fail {
  60. color: #721c24;
  61. }
  62. code {
  63. font-family: monospace;
  64. font-size: 15px;
  65. background: #f1f0f0;
  66. }
  67. .alert {
  68. padding: 20px;
  69. border-radius: 12px;
  70. border: 1px solid;
  71. margin-bottom: 20px;
  72. }
  73. .alert code {
  74. background: none;
  75. }
  76. .danger {
  77. color: #721c24;
  78. background-color: #f8d7da;
  79. border-color: #f5c6cb;
  80. }
  81. .success {
  82. color: #155724;
  83. background-color: #d4edda;
  84. border-color: #c3e6cb;
  85. }
  86. .icon {
  87. display: inline-block;
  88. width: 24px;
  89. height: 24px;
  90. margin-bottom: -6px;
  91. margin-right: 10px;
  92. }
  93. .icon-success {
  94. background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMTU1NzI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPiAgICA8cGF0aCBkPSJNOSAxNi4yTDQuOCAxMmwtMS40IDEuNEw5IDE5IDIxIDdsLTEuNC0xLjRMOSAxNi4yeiIvPjwvc3ZnPg==);
  95. }
  96. .icon-danger {
  97. background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNzIxYzI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMnoiLz4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==);
  98. }
  99. </style>
  100. </head>
  101. <body>
  102. <div class="container">
  103. <div class="logo"></div>
  104. <h1>Environment Tests</h1>
  105. <p>
  106. The following tests have been run to determine if Koseven will work in your environment. If any of the tests have failed, consult the <a href="https://docs.koseven.ga/guide/kohana/install" target="_blank">documentation</a> for more information on how to correct the problem.
  107. </p>
  108. <?php $failed = FALSE ?>
  109. <table>
  110. <tbody>
  111. <tr>
  112. <th>PHP Version</th>
  113. <?php if (version_compare(PHP_VERSION, '7', '>=')): ?>
  114. <td class="pass">
  115. <?php echo PHP_VERSION ?>
  116. </td>
  117. <?php else: $failed = TRUE ?>
  118. <td class="fail">Koseven requires PHP 7 or newer, this version is
  119. <?php echo PHP_VERSION ?>.</td>
  120. <?php endif ?>
  121. </tr>
  122. <tr>
  123. <th>System Directory</th>
  124. <?php if (is_dir(SYSPATH) AND is_file(SYSPATH.'classes/Kohana'.EXT)): ?>
  125. <td class="pass">
  126. <?php echo SYSPATH ?>
  127. </td>
  128. <?php else: $failed = TRUE ?>
  129. <td class="fail">The configured <code>system</code> directory does not exist or does not contain required files.</td>
  130. <?php endif ?>
  131. </tr>
  132. <tr>
  133. <th>Application Directory</th>
  134. <?php if (is_dir(APPPATH) AND is_file(APPPATH.'bootstrap'.EXT)): ?>
  135. <td class="pass">
  136. <?php echo APPPATH ?>
  137. </td>
  138. <?php else: $failed = TRUE ?>
  139. <td class="fail">The configured <code>application</code> directory does not exist or does not contain required files.</td>
  140. <?php endif ?>
  141. </tr>
  142. <tr>
  143. <th>Cache Directory</th>
  144. <?php if (is_dir(APPPATH) AND is_dir(APPPATH.'cache') AND is_writable(APPPATH.'cache')): ?>
  145. <td class="pass">
  146. <?php echo APPPATH.'cache/' ?>
  147. </td>
  148. <?php else: $failed = TRUE ?>
  149. <td class="fail">The <code><?php echo APPPATH.'cache/' ?></code> directory is not writable.</td>
  150. <?php endif ?>
  151. </tr>
  152. <tr>
  153. <th>Logs Directory</th>
  154. <?php if (is_dir(APPPATH) AND is_dir(APPPATH.'logs') AND is_writable(APPPATH.'logs')): ?>
  155. <td class="pass">
  156. <?php echo APPPATH.'logs/' ?>
  157. </td>
  158. <?php else: $failed = TRUE ?>
  159. <td class="fail">The <code><?php echo APPPATH.'logs/' ?></code> directory is not writable.</td>
  160. <?php endif ?>
  161. </tr>
  162. <tr>
  163. <th>PCRE UTF-8</th>
  164. <?php if ( ! @preg_match('/^.$/u', 'ñ')): $failed = TRUE ?>
  165. <td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with UTF-8 support.</td>
  166. <?php elseif ( ! @preg_match('/^\pL$/u', 'ñ')): $failed = TRUE ?>
  167. <td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with Unicode property support.</td>
  168. <?php else: ?>
  169. <td class="pass">Pass</td>
  170. <?php endif ?>
  171. </tr>
  172. <tr>
  173. <th>SPL Enabled</th>
  174. <?php if (function_exists('spl_autoload_register')): ?>
  175. <td class="pass">Pass</td>
  176. <?php else: $failed = TRUE ?>
  177. <td class="fail">PHP <a href="http://www.php.net/spl">SPL</a> is either not loaded or not compiled in.</td>
  178. <?php endif ?>
  179. </tr>
  180. <tr>
  181. <th>Reflection Enabled</th>
  182. <?php if (class_exists('ReflectionClass')): ?>
  183. <td class="pass">Pass</td>
  184. <?php else: $failed = TRUE ?>
  185. <td class="fail">PHP <a href="http://www.php.net/reflection">reflection</a> is either not loaded or not compiled in.</td>
  186. <?php endif ?>
  187. </tr>
  188. <tr>
  189. <th>Filters Enabled</th>
  190. <?php if (function_exists('filter_list')): ?>
  191. <td class="pass">Pass</td>
  192. <?php else: $failed = TRUE ?>
  193. <td class="fail">The <a href="http://www.php.net/filter">filter</a> extension is either not loaded or not compiled in.</td>
  194. <?php endif ?>
  195. </tr>
  196. <tr>
  197. <th>Iconv Extension Loaded</th>
  198. <?php if (extension_loaded('iconv')): ?>
  199. <td class="pass">Pass</td>
  200. <?php else: $failed = TRUE ?>
  201. <td class="fail">The <a href="http://php.net/iconv">iconv</a> extension is not loaded.</td>
  202. <?php endif ?>
  203. </tr>
  204. <?php if (extension_loaded('mbstring')): ?>
  205. <tr>
  206. <th>Mbstring Not Overloaded</th>
  207. <?php if (ini_get('mbstring.func_overload') ): $failed = TRUE ?>
  208. <td class="fail">The <a href="http://php.net/mbstring">mbstring</a> extension is overloading PHP's native string functions.</td>
  209. <?php else: ?>
  210. <td class="pass">Pass</td>
  211. <?php endif ?>
  212. </tr>
  213. <?php endif ?>
  214. <tr>
  215. <th>Character Type (CTYPE) Extension</th>
  216. <?php if ( ! function_exists('ctype_digit')): $failed = TRUE ?>
  217. <td class="fail">The <a href="http://php.net/ctype">ctype</a> extension is not enabled.</td>
  218. <?php else: ?>
  219. <td class="pass">Pass</td>
  220. <?php endif ?>
  221. </tr>
  222. <tr>
  223. <th>URI Determination</th>
  224. <?php if (isset($_SERVER['REQUEST_URI']) OR isset($_SERVER['PHP_SELF']) OR isset($_SERVER['PATH_INFO'])): ?>
  225. <td class="pass">Pass</td>
  226. <?php else: $failed = TRUE ?>
  227. <td class="fail">Neither <code>$_SERVER['REQUEST_URI']</code>, <code>$_SERVER['PHP_SELF']</code>, or <code>$_SERVER['PATH_INFO']</code> is available.</td>
  228. <?php endif ?>
  229. </tr>
  230. </tbody>
  231. </table>
  232. <?php if ($failed === TRUE): ?>
  233. <div id="results" class="alert danger">
  234. <span class="icon icon-danger"></span> Koseven may not work correctly with your environment.
  235. </div>
  236. <?php else: ?>
  237. <div id="results" class="alert success">
  238. <span class="icon icon-success"></span> Your environment passed all requirements. Remove or rename the <code>install<?php echo EXT ?></code> file now.
  239. </div>
  240. <?php endif ?>
  241. <h1>Optional Tests</h1>
  242. <p>
  243. The following extensions are not required to run the Koseven core, but if enabled can provide access to additional classes.
  244. </p>
  245. <table>
  246. <tbody>
  247. <tr>
  248. <th>PECL HTTP Enabled</th>
  249. <?php if (extension_loaded('http')): ?>
  250. <td class="pass">Pass</td>
  251. <?php else: ?>
  252. <td class="fail">Koseven can use the <a href="http://php.net/http">http</a> extension for the Request_Client_External class.</td>
  253. <?php endif ?>
  254. </tr>
  255. <tr>
  256. <th>cURL Enabled</th>
  257. <?php if (extension_loaded('curl')): ?>
  258. <td class="pass">Pass</td>
  259. <?php else: ?>
  260. <td class="fail">Koseven can use the <a href="http://php.net/curl">cURL</a> extension for the Request_Client_External class.</td>
  261. <?php endif ?>
  262. </tr>
  263. <tr>
  264. <th>GD Enabled</th>
  265. <?php if (function_exists('gd_info')): ?>
  266. <td class="pass">Pass</td>
  267. <?php else: ?>
  268. <td class="fail">Koseven requires <a href="http://php.net/gd">GD</a> v2 for the Image class.</td>
  269. <?php endif ?>
  270. </tr>
  271. <tr>
  272. <th>MySQLi Enabled</th>
  273. <?php if (function_exists('mysqli_connect')): ?>
  274. <td class="pass">Pass</td>
  275. <?php else: ?>
  276. <td class="fail">Koseven can use the <a href="http://php.net/mysqli">MySQLi</a> extension to support MySQL databases.</td>
  277. <?php endif ?>
  278. </tr>
  279. <tr>
  280. <th>PDO Enabled</th>
  281. <?php if (class_exists('PDO')): ?>
  282. <td class="pass">Pass</td>
  283. <?php else: ?>
  284. <td class="fail">Koseven can use <a href="http://php.net/pdo">PDO</a> to support additional databases.</td>
  285. <?php endif ?>
  286. </tr>
  287. </tbody>
  288. </table>
  289. </div>
  290. </body>
  291. </html>