For those who are awake!
Discount -15%
We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.14.1.1. Installing Symfony

To install Symfony, do the following:

  1. Install Composer (if not installed).
  2. Install Symfony by running the command:
    composer create-project symfony/framework-standard-edition /home/name_account/имя_site.com/www/ 2.7.3

    In the command, substitute your data:

    • Instead name_accounthosting account namewhere you are installing.
    • Instead имя_site.com - the name of your site directory.
    • Instead 2.7.3 - the version of the installed framework.
  3. Required copy the files and directories of the system to the main directory of the site, but at the same time all the contents of the directory web place also in the main directory.
  4. Replace the lines:
    • In files app.php и app_dev.php lines:
      $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
      require_once __DIR__ . '/../app/AppKernel.php';

      On:

      $loader = require_once __DIR__ . '/app/bootstrap.php.cache';
      require_once __DIR__ . '/app/AppKernel.php';
    • In file config.php line:
      require_once dirname(__FILE__) . '/../app/SymfonyRequirements.php';

      On:

      require_once dirname(__FILE__) . '/app/SymfonyRequirements.php';
  5. Comment out the blocks of code:
    • In file app_dev.php this block:
      if (isset($_SERVER['HTTP_CLIENT_IP'])
          || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
          || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))
      ) {
          header('HTTP/1.0 403 Forbidden');
          exit('You are not allowed to access this file. Check ' . basename(__FILE__) . ' for more information.');
      }
    • In file config.php this block:
      if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
          '127.0.0.1',
          '::1',
      ))) {
          header('HTTP/1.0 403 Forbidden');
          exit('This script is only accessible from localhost.');
      }
  6. Start the system configurator by opening an address in the browser like http: // name_site.com / config.php.