config.php 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. if (!isset($_SERVER['HTTP_HOST'])) {
  3. exit('This script cannot be run from the CLI. Run it from a browser.');
  4. }
  5. if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
  6. '127.0.0.1',
  7. '::1',
  8. ))) {
  9. header('HTTP/1.0 403 Forbidden');
  10. exit('This script is only accessible from localhost.');
  11. }
  12. require_once dirname(__FILE__).'/../app/SymfonyRequirements.php';
  13. $symfonyRequirements = new SymfonyRequirements();
  14. $majorProblems = $symfonyRequirements->getFailedRequirements();
  15. $minorProblems = $symfonyRequirements->getFailedRecommendations();
  16. ?>
  17. <!DOCTYPE html>
  18. <html lang="en">
  19. <head>
  20. <meta charset="UTF-8" />
  21. <link rel="stylesheet" href="bundles/sensiodistribution/webconfigurator/css/install.css" media="all" />
  22. <title>Symfony Configuration</title>
  23. </head>
  24. <body>
  25. <div id="symfony-wrapper">
  26. <div id="symfony-content">
  27. <div class="symfony-blocks-install">
  28. <div class="symfony-block-logo">
  29. <img src="bundles/sensiodistribution/webconfigurator/images/logo-big.gif" alt="Symfony logo" />
  30. </div>
  31. <div class="symfony-block-content">
  32. <h1>Welcome!</h1>
  33. <p>Welcome to your new Symfony project.</p>
  34. <p>
  35. This script will guide you through the basic configuration of your project.
  36. You can also do the same by editing the ‘<strong>app/config/parameters.yml</strong>’ file directly.
  37. </p>
  38. <?php if (count($majorProblems)): ?>
  39. <h2 class="ko">Major problems</h2>
  40. <p>Major problems have been detected and <strong>must</strong> be fixed before continuing:</p>
  41. <ol>
  42. <?php foreach ($majorProblems as $problem): ?>
  43. <li><?php echo $problem->getHelpHtml() ?></li>
  44. <?php endforeach; ?>
  45. </ol>
  46. <?php endif; ?>
  47. <?php if (count($minorProblems)): ?>
  48. <h2>Recommendations</h2>
  49. <p>
  50. <?php if (count($majorProblems)): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience,
  51. it’s recommended that you fix the following:
  52. </p>
  53. <ol>
  54. <?php foreach ($minorProblems as $problem): ?>
  55. <li><?php echo $problem->getHelpHtml() ?></li>
  56. <?php endforeach; ?>
  57. </ol>
  58. <?php endif; ?>
  59. <?php if ($symfonyRequirements->hasPhpIniConfigIssue()): ?>
  60. <p id="phpini">*
  61. <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?>
  62. Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>".
  63. <?php else: ?>
  64. To change settings, create a "<strong>php.ini</strong>".
  65. <?php endif; ?>
  66. </p>
  67. <?php endif; ?>
  68. <?php if (!count($majorProblems) && !count($minorProblems)): ?>
  69. <p class="ok">Your configuration looks good to run Symfony.</p>
  70. <?php endif; ?>
  71. <ul class="symfony-install-continue">
  72. <?php if (!count($majorProblems)): ?>
  73. <li><a href="app_dev.php/_configurator/">Configure your Symfony Application online</a></li>
  74. <li><a href="app_dev.php/">Bypass configuration and go to the Welcome page</a></li>
  75. <?php endif; ?>
  76. <?php if (count($majorProblems) || count($minorProblems)): ?>
  77. <li><a href="config.php">Re-check configuration</a></li>
  78. <?php endif; ?>
  79. </ul>
  80. </div>
  81. </div>
  82. </div>
  83. <div class="version">Symfony Standard Edition</div>
  84. </div>
  85. </body>
  86. </html>