https.php

  1. cis7 modules/simpletest/tests/https.php
  2. cle7 modules/simpletest/tests/https.php
  3. ecd7 modules/simpletest/tests/https.php
  4. elmsmedia7 modules/simpletest/tests/https.php
  5. harmony7 modules/simpletest/tests/https.php
  6. icor7 modules/simpletest/tests/https.php
  7. meedjum_blog7 modules/simpletest/tests/https.php
  8. mooc7 modules/simpletest/tests/https.php

Fake an HTTPS request, for use during testing.

Constants

Namesort descending Description
DRUPAL_ROOT

File

modules/simpletest/tests/https.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Fake an HTTPS request, for use during testing.
  5. */
  6. // Set a global variable to indicate a mock HTTPS request.
  7. $is_https_mock = empty($_SERVER['HTTPS']);
  8. // Change to HTTPS.
  9. $_SERVER['HTTPS'] = 'on';
  10. foreach ($_SERVER as $key => $value) {
  11. $_SERVER[$key] = str_replace('modules/simpletest/tests/https.php', 'index.php', $value);
  12. $_SERVER[$key] = str_replace('http://', 'https://', $_SERVER[$key]);
  13. }
  14. // Change current directory to the Drupal root.
  15. chdir('../../..');
  16. define('DRUPAL_ROOT', getcwd());
  17. require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
  18. // Make sure this file can only be used by simpletest.
  19. drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION);
  20. if (!drupal_valid_test_ua()) {
  21. header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
  22. exit;
  23. }
  24. drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  25. menu_execute_active_handler();
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.