config.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <?php
  2. /*
  3. * ************** CAUTION **************
  4. *
  5. * DO NOT EDIT THIS FILE as it will be overridden by Composer as part of
  6. * the installation/update process. The original file resides in the
  7. * SensioDistributionBundle.
  8. *
  9. * ************** CAUTION **************
  10. */
  11. if (!isset($_SERVER['HTTP_HOST'])) {
  12. exit('This script cannot be run from the CLI. Run it from a browser.');
  13. }
  14. if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
  15. '127.0.0.1',
  16. '::1',
  17. ))) {
  18. header('HTTP/1.0 403 Forbidden');
  19. exit('This script is only accessible from localhost.');
  20. }
  21. require_once dirname(__FILE__).'/./SymfonyRequirements.php';
  22. $symfonyRequirements = new SymfonyRequirements();
  23. $majorProblems = $symfonyRequirements->getFailedRequirements();
  24. $minorProblems = $symfonyRequirements->getFailedRecommendations();
  25. ?>
  26. <!DOCTYPE html>
  27. <html>
  28. <head>
  29. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  30. <meta name="robots" content="noindex,nofollow" />
  31. <title>Symfony Configuration Checker</title>
  32. <link rel="stylesheet" href="bundles/framework/css/structure.css" media="all" />
  33. <link rel="stylesheet" href="bundles/framework/css/body.css" media="all" />
  34. <style type="text/css">
  35. /* styles copied from bundles/sensiodistribution/webconfigurator/css/install.css */
  36. body {
  37. font-size: 14px;
  38. font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
  39. }
  40. .sf-reset h1.title {
  41. font-size: 45px;
  42. padding-bottom: 30px;
  43. }
  44. .sf-reset h2 {
  45. font-weight: bold;
  46. color: #FFFFFF;
  47. /* Font is reset to sans-serif (like body) */
  48. font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
  49. margin-bottom: 10px;
  50. background-color: #aacd4e;
  51. padding: 2px 4px;
  52. display: inline-block;
  53. text-transform: uppercase;
  54. }
  55. .sf-reset ul a,
  56. .sf-reset ul a:hover {
  57. background: url(../images/blue-arrow.png) no-repeat right 6px;
  58. padding-right: 10px;
  59. }
  60. .sf-reset ul, ol {
  61. padding-left: 20px;
  62. }
  63. .sf-reset li {
  64. padding-bottom: 18px;
  65. }
  66. .sf-reset ol li {
  67. list-style-type: decimal;
  68. }
  69. .sf-reset ul li {
  70. list-style-type: none;
  71. }
  72. .sf-reset .symfony-blocks-install {
  73. overflow: hidden;
  74. }
  75. .sf-reset .symfony-install-continue {
  76. font-size: 0.95em;
  77. padding-left: 0;
  78. }
  79. .sf-reset .symfony-install-continue li {
  80. padding-bottom: 10px;
  81. }
  82. .sf-reset .ok {
  83. color: #fff;
  84. font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
  85. background-color: #6d6;
  86. padding: 10px;
  87. margin-bottom: 20px;
  88. }
  89. .sf-reset .ko {
  90. background-color: #d66;
  91. }
  92. .version {
  93. text-align: right;
  94. font-size: 10px;
  95. margin-right: 20px;
  96. }
  97. .sf-reset a,
  98. .sf-reset li a {
  99. color: #08C;
  100. text-decoration: none;
  101. }
  102. .sf-reset a:hover,
  103. .sf-reset li a:hover {
  104. color: #08C;
  105. text-decoration: underline;
  106. }
  107. .sf-reset textarea {
  108. padding: 7px;
  109. }
  110. </style>
  111. </head>
  112. <body>
  113. <div id="content">
  114. <div class="header clear-fix">
  115. <div class="header-logo">
  116. <img src="bundles/framework/images/logo_symfony.png" alt="Symfony" />
  117. </div>
  118. <div class="search">
  119. <form method="get" action="http://symfony.com/search">
  120. <div class="form-row">
  121. <label for="search-id">
  122. <img src="bundles/framework/images/grey_magnifier.png" alt="Search on Symfony website" />
  123. </label>
  124. <input name="q" id="search-id" type="search" placeholder="Search on Symfony website" />
  125. <button type="submit" class="sf-button">
  126. <span class="border-l">
  127. <span class="border-r">
  128. <span class="btn-bg">OK</span>
  129. </span>
  130. </span>
  131. </button>
  132. </div>
  133. </form>
  134. </div>
  135. </div>
  136. <div class="sf-reset">
  137. <div class="block">
  138. <div class="symfony-block-content">
  139. <h1 class="title">Configuration Checker</h1>
  140. <p>
  141. This script analyzes your system to check whether is
  142. ready to run Symfony applications.
  143. </p>
  144. <?php if (count($majorProblems)): ?>
  145. <h2 class="ko">Major problems</h2>
  146. <p>Major problems have been detected and <strong>must</strong> be fixed before continuing:</p>
  147. <ol>
  148. <?php foreach ($majorProblems as $problem): ?>
  149. <li><?php echo $problem->getHelpHtml() ?></li>
  150. <?php endforeach; ?>
  151. </ol>
  152. <?php endif; ?>
  153. <?php if (count($minorProblems)): ?>
  154. <h2>Recommendations</h2>
  155. <p>
  156. <?php if (count($majorProblems)): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience,
  157. it’s recommended that you fix the following:
  158. </p>
  159. <ol>
  160. <?php foreach ($minorProblems as $problem): ?>
  161. <li><?php echo $problem->getHelpHtml() ?></li>
  162. <?php endforeach; ?>
  163. </ol>
  164. <?php endif; ?>
  165. <?php if ($symfonyRequirements->hasPhpIniConfigIssue()): ?>
  166. <p id="phpini">*
  167. <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?>
  168. Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>".
  169. <?php else: ?>
  170. To change settings, create a "<strong>php.ini</strong>".
  171. <?php endif; ?>
  172. </p>
  173. <?php endif; ?>
  174. <?php if (!count($majorProblems) && !count($minorProblems)): ?>
  175. <p class="ok">All checks passed successfully. Your system is ready to run Symfony applications.</p>
  176. <?php endif; ?>
  177. <ul class="symfony-install-continue">
  178. <?php if (count($majorProblems) || count($minorProblems)): ?>
  179. <li><a href="config.php">Re-check configuration</a></li>
  180. <?php endif; ?>
  181. </ul>
  182. </div>
  183. </div>
  184. </div>
  185. <div class="version">Symfony Standard Edition</div>
  186. </div>
  187. </body>
  188. </html>