annotate a_config.php @ 1:f38015048f48 tip

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