Upgraded drupal core with security updates
[yaffs-website] / web / core / install.php
1 <?php
2
3 /**
4  * @file
5  * Initiates a browser-based installation of Drupal.
6  */
7
8 use Drupal\Component\Utility\OpCodeCache;
9
10 // Change the directory to the Drupal root.
11 chdir('..');
12 // Store the Drupal root path.
13 $root_path = realpath('');
14
15 /**
16  * Global flag to indicate the site is in installation mode.
17  *
18  * The constant is defined using define() instead of const so that PHP
19  * versions prior to 5.3 can display proper PHP requirements instead of causing
20  * a fatal error.
21  */
22 define('MAINTENANCE_MODE', 'install');
23
24 // Exit early if running an incompatible PHP version to avoid fatal errors.
25 // The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not
26 // yet available. It is defined in bootstrap.inc, but it is not possible to
27 // load that file yet as it would cause a fatal error on older versions of PHP.
28 if (version_compare(PHP_VERSION, '5.5.9') < 0) {
29   print 'Your PHP installation is too old. Drupal requires at least PHP 5.5.9. See the <a href="https://www.drupal.org/requirements">system requirements</a> page for more information.';
30   exit;
31 }
32
33 // Initialize the autoloader.
34 $class_loader = require_once $root_path . '/autoload.php';
35
36 // If OPCache is in use, ensure opcache.save_comments is enabled.
37 if (OpCodeCache::isEnabled() && !ini_get('opcache.save_comments')) {
38   print 'Systems with OPcache installed must have <a href="http://php.net/manual/en/opcache.configuration.php#ini.opcache.save-comments">opcache.save_comments</a> enabled.';
39   exit();
40 }
41
42 // Start the installer.
43 require_once $root_path . '/core/includes/install.core.inc';
44 install_drupal($class_loader);