1

Every now and then our site gives out this error:

Notice: Constant CACHE_PERMANENT already defined in C:\Inetpub\wwwroot\includes\bootstrap.inc on line 13

Notice: Constant CACHE_TEMPORARY already defined in C:\Inetpub\wwwroot\includes\bootstrap.inc on line 18

Notice: Constant WATCHDOG_ALERT already defined in C:\Inetpub\wwwroot\includes\bootstrap.inc on line 57

Notice: Constant WATCHDOG_CRITICAL already defined in C:\Inetpub\wwwroot\includes\bootstrap.inc on line 68

Notice: Constant WATCHDOG_ERROR already defined in C:\Inetpub\wwwroot\includes\bootstrap.inc on line 79

Notice: Constant WATCHDOG_WARNING already defined in C:\Inetpub\wwwroot\includes\bootstrap.inc on line 90

Notice: Constant WATCHDOG_NOTICE already defined in C:\Inetpub\wwwroot\includes\bootst... as of 10:40:01 on 2011-07-14.

Don't know what happens that bootstap.inc get run twice? Why else would it complain about constants already being defined. Thanks for any insight.

2
  • did you just install a new module, change a setting etc. Something mustve trigger this
    – iStryker
    Jul 15, 2011 at 15:07
  • 1
    Drupal Answers is not a replacement for the Drupal Issue Queue. Jul 15, 2011 at 15:54

2 Answers 2

1

The bootstrap.inc file is included, from index.php, using require_once './includes/bootstrap.inc' (Drupal 6) or require_once DRUPAL_ROOT . '/includes/bootstrap.inc' (Drupal 7). That one of the first instruction executed from Drupal when bootstrapping, as the bootstrap code is all contained in that file.

The errors you are seeing could be caused from a module that is using include or require to load the bootstrap.inc file, which would not be necessary, as the file is already loaded from Drupal.
Alternatively, the errors are caused from a module that defines those constants in one of its files, which is then causing those errors once it is loaded. For example, it could be a module that implements an alternative to the cache mechanism implemented from Drupal, which defines those constants with the wrong assumption that they would not be available.

0

I had this same error and what caused it was a file in a module I created. This file had the same name as a core Drupal file. I renamed it and the errors went away. If you can't rename it try specifying the absolute path instead of just " require 'bootstrap.php' ". Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.