Skip to content
Snippets Groups Projects
Select Git revision
  • 4697eb9ca56a2b16ac94025e74b1f0242bbb30f2
  • 11.x default protected
  • 11.2.x protected
  • 10.5.x protected
  • 10.6.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
  • 10.4.5 protected
  • 11.0.13 protected
41 results

index.php

Blame
  • Dries's avatar
    Issue #2303673 by dawehner, damiankloip, effulgentsia, Fabianx: Implement...
    Dries Buytaert authored
    Issue #2303673 by dawehner, damiankloip, effulgentsia, Fabianx: Implement stackphp; cleanup handlePageCache() and preHandle()
    5ef912e9
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    index.php 1.24 KiB
    <?php
    
    /**
     * @file
     * The PHP page that serves all page requests on a Drupal installation.
     *
     * All Drupal code is released under the GNU General Public License.
     * See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
     */
    
    use Drupal\Core\DrupalKernel;
    use Drupal\Core\Site\Settings;
    use Symfony\Component\HttpFoundation\Request;
    
    $autoloader = require_once __DIR__ . '/core/vendor/autoload.php';
    
    try {
    
      $request = Request::createFromGlobals();
      $kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod');
      $response = $kernel
          ->handle($request)
          // Handle the response object.
          ->prepare($request)->send();
      $kernel->terminate($request, $response);
    }
    catch (Exception $e) {
      $message = 'If you have just changed code (for example deployed a new module or moved an existing one) read <a href="http://drupal.org/documentation/rebuild">http://drupal.org/documentation/rebuild</a>';
      if (Settings::get('rebuild_access', FALSE)) {
        $rebuild_path = $GLOBALS['base_url'] . '/rebuild.php';
        $message .= " or run the <a href=\"$rebuild_path\">rebuild script</a>";
      }
    
      // Set the response code manually. Otherwise, this response will default to a
      // 200.
      http_response_code(500);
      print $message;
      throw $e;
    }