install.php

  1. drupal
    1. 4.7 developer/hooks/install.php
    2. 5 install.php
    3. 5 developer/hooks/install.php
    4. 6 install.php
    5. 6 developer/hooks/install.php
    6. 7 install.php
    7. 8 core/install.php

Initiates a browser-based installation of Drupal.

Constants

NameDescription
DRUPAL_ROOTRoot directory of Drupal installation.
MAINTENANCE_MODEGlobal flag to indicate that site is in installation mode.

File

core/install.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Initiates a browser-based installation of Drupal.
  5. */
  6. // Change the directory to the Drupal root.
  7. chdir('..');
  8. /**
  9. * Root directory of Drupal installation.
  10. */
  11. define('DRUPAL_ROOT', getcwd());
  12. /**
  13. * Global flag to indicate that site is in installation mode.
  14. *
  15. * This constant is defined using define() instead of const so that PHP
  16. * versions older than 5.3 can display the proper PHP requirements instead of
  17. * causing a fatal error.
  18. */
  19. define('MAINTENANCE_MODE', 'install');
  20. // Exit early if running an incompatible PHP version to avoid fatal errors.
  21. // The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not
  22. // yet available. It is defined in bootstrap.inc, but it is not possible to
  23. // load that file yet as it would cause a fatal error on older versions of PHP.
  24. if (version_compare(PHP_VERSION, '5.3.3') < 0) {
  25. print 'Your PHP installation is too old. Drupal requires at least PHP 5.3.3. See the <a href="http://drupal.org/requirements">system requirements</a> page for more information.';
  26. exit;
  27. }
  28. // Start the installer.
  29. require_once DRUPAL_ROOT . '/core/includes/install.core.inc';
  30. install_drupal();
Login or register to post comments