2006-07-13 13:14:25 +00:00
< ? php
2010-02-17 04:19:51 +00:00
/**
* @ file
* Initiates a browser - based installation of Drupal .
*/
2016-08-01 11:42:23 +00:00
use Drupal\Component\Utility\OpCodeCache ;
2011-10-31 04:05:57 +00:00
// Change the directory to the Drupal root.
chdir ( '..' );
2016-01-25 00:39:32 +00:00
// Store the Drupal root path.
$root_path = realpath ( '' );
2011-10-31 04:05:57 +00:00
2008-05-26 17:12:55 +00:00
/**
2012-09-14 15:19:14 +00:00
* Global flag to indicate the site is in installation mode .
2011-12-09 03:16:39 +00:00
*
2012-09-14 15:19:14 +00:00
* The constant is defined using define () instead of const so that PHP
* versions prior to 5.3 can display proper PHP requirements instead of causing
* a fatal error .
2008-05-26 17:12:55 +00:00
*/
2011-12-09 03:16:39 +00:00
define ( 'MAINTENANCE_MODE' , 'install' );
2007-11-30 12:19:10 +00:00
2010-10-22 02:53:19 +00:00
// Exit early if running an incompatible PHP version to avoid fatal errors.
2011-06-11 23:33:58 +00:00
// The minimum version is specified explicitly, as DRUPAL_MINIMUM_PHP is not
// yet available. It is defined in bootstrap.inc, but it is not possible to
// load that file yet as it would cause a fatal error on older versions of PHP.
2020-01-21 11:05:11 +00:00
if ( version_compare ( PHP_VERSION , '7.3.0' ) < 0 ) {
print 'Your PHP installation is too old. Drupal requires at least PHP 7.3.0. See the <a href="https://www.drupal.org/requirements">system requirements</a> page for more information.' ;
2013-06-17 00:13:16 +00:00
exit ;
}
2016-08-01 11:42:23 +00:00
// Initialize the autoloader.
$class_loader = require_once $root_path . '/autoload.php' ;
// If OPCache is in use, ensure opcache.save_comments is enabled.
if ( OpCodeCache :: isEnabled () && ! ini_get ( 'opcache.save_comments' )) {
2018-01-04 22:09:08 +00:00
print 'Systems with OPcache installed must have <a href="http://php.net/manual/opcache.configuration.php#ini.opcache.save-comments">opcache.save_comments</a> enabled.' ;
2015-12-08 13:56:49 +00:00
exit ();
}
2010-02-17 04:19:51 +00:00
// Start the installer.
2016-01-25 00:39:32 +00:00
require_once $root_path . '/core/includes/install.core.inc' ;
2014-12-09 12:01:06 +00:00
install_drupal ( $class_loader );