summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/install.php b/install.php
index d54ab09fe..11f8d3010 100644
--- a/install.php
+++ b/install.php
@@ -1696,7 +1696,7 @@ function install_configure_form_submit($form, &$form_state) {
// file to be included by command line scripts so that it can be used as an
// API. It should be removed after the API functions in this file have been
// moved out to a separate, reusable location.
-if (realpath($_SERVER['SCRIPT_FILENAME']) == __FILE__) {
+if (php_sapi_name() != 'cli' && !empty($_SERVER['REMOTE_ADDR'])) {
// Start the installer.
install_drupal();
}