first commit after reset
[mixstore.git] / web / config.php
1 <?php
2
3 if (!isset($_SERVER['HTTP_HOST'])) {
4 exit('This script cannot be run from the CLI. Run it from a browser.');
5 }
6
7 if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
8 '127.0.0.1',
9 '::1',
10 ))) {
11 header('HTTP/1.0 403 Forbidden');
12 exit('This script is only accessible from localhost.');
13 }
14
15 require_once dirname(__FILE__).'/../app/SymfonyRequirements.php';
16
17 $symfonyRequirements = new SymfonyRequirements();
18
19 $majorProblems = $symfonyRequirements->getFailedRequirements();
20 $minorProblems = $symfonyRequirements->getFailedRecommendations();
21
22 ?>
23 <!DOCTYPE html>
24 <html>
25 <head>
26 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
27 <meta name="robots" content="noindex,nofollow" />
28 <title>Symfony Configuration</title>
29 <link rel="stylesheet" href="bundles/framework/css/structure.css" media="all" />
30 <link rel="stylesheet" href="bundles/framework/css/body.css" media="all" />
31 <link rel="stylesheet" href="bundles/sensiodistribution/webconfigurator/css/install.css" media="all" />
32 </head>
33 <body>
34 <div id="content">
35 <div class="header clear-fix">
36 <div class="header-logo">
37 <img src="bundles/framework/images/logo_symfony.png" alt="Symfony" />
38 </div>
39
40 <div class="search">
41 <form method="get" action="http://symfony.com/search">
42 <div class="form-row">
43
44 <label for="search-id">
45 <img src="bundles/framework/images/grey_magnifier.png" alt="Search on Symfony website" />
46 </label>
47
48 <input name="q" id="search-id" type="search" placeholder="Search on Symfony website" />
49
50 <button type="submit" class="sf-button">
51 <span class="border-l">
52 <span class="border-r">
53 <span class="btn-bg">OK</span>
54 </span>
55 </span>
56 </button>
57 </div>
58 </form>
59 </div>
60 </div>
61
62 <div class="sf-reset">
63 <div class="block">
64 <div class="symfony-block-content">
65 <h1 class="title">Welcome!</h1>
66 <p>Welcome to your new Symfony project.</p>
67 <p>
68 This script will guide you through the basic configuration of your project.
69 You can also do the same by editing the ‘<strong>app/config/parameters.yml</strong>’ file directly.
70 </p>
71
72 <?php if (count($majorProblems)): ?>
73 <h2 class="ko">Major problems</h2>
74 <p>Major problems have been detected and <strong>must</strong> be fixed before continuing:</p>
75 <ol>
76 <?php foreach ($majorProblems as $problem): ?>
77 <li><?php echo $problem->getHelpHtml() ?></li>
78 <?php endforeach; ?>
79 </ol>
80 <?php endif; ?>
81
82 <?php if (count($minorProblems)): ?>
83 <h2>Recommendations</h2>
84 <p>
85 <?php if (count($majorProblems)): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience,
86 it’s recommended that you fix the following:
87 </p>
88 <ol>
89 <?php foreach ($minorProblems as $problem): ?>
90 <li><?php echo $problem->getHelpHtml() ?></li>
91 <?php endforeach; ?>
92 </ol>
93 <?php endif; ?>
94
95 <?php if ($symfonyRequirements->hasPhpIniConfigIssue()): ?>
96 <p id="phpini">*
97 <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?>
98 Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>".
99 <?php else: ?>
100 To change settings, create a "<strong>php.ini</strong>".
101 <?php endif; ?>
102 </p>
103 <?php endif; ?>
104
105 <?php if (!count($majorProblems) && !count($minorProblems)): ?>
106 <p class="ok">Your configuration looks good to run Symfony.</p>
107 <?php endif; ?>
108
109 <ul class="symfony-install-continue">
110 <?php if (!count($majorProblems)): ?>
111 <li><a href="app_dev.php/_configurator/">Configure your Symfony Application online</a></li>
112 <li><a href="app_dev.php/">Bypass configuration and go to the Welcome page</a></li>
113 <?php endif; ?>
114 <?php if (count($majorProblems) || count($minorProblems)): ?>
115 <li><a href="config.php">Re-check configuration</a></li>
116 <?php endif; ?>
117 </ul>
118 </div>
119 </div>
120 </div>
121 <div class="version">Symfony Standard Edition</div>
122 </div>
123 </body>
124 </html>