Suddenly, I got this error when I was configuring rules; the entire Drupal site is not accessible, not even update.php.

Fatal error: Cannot declare self-referencing constant '' in I:\My Documents\web\xampp\htdocs\mysite\includes\database\database.inc on line 2101

The last thing I remember was configuring rules with custom PHP.

  • 1
    What exact version of D7 are you using? That file has changed a few times, so the number reference need to be looked at in context of the proper version. – mpdonadio Nov 16 '11 at 17:48
  • 7.9 newest release I recently updated. However, on my other machine 7.8 with the same rules module and a copy of the same site I did not get this error... – jan Nov 17 '11 at 16:56
  • this is weird, I opened the site just now and everything is fine again! Could it be that a cache with the problem code got refreshed and deleted after 24 hours? – jan Nov 17 '11 at 17:20
  • 2
    If cron ran, then system_cron() clears the cache tables. Clearing cache fixes a lot fo problems/weirdness in Drupal. – mpdonadio Nov 17 '11 at 19:52

I suddenly got this same error on a Windows workstation.

It does not have anything to do with the content of the database (including cache); it occurs before it even connects to the database.

The only fix that worked for me was restarting apache.


  1. The character within quotes is "EOT" ("end of transmission"), which looks empty in the error message.
  2. The line 2101 in database.inc is the start of the DatabaseStatementBase class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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