"Cannot declare self-referencing constant database.inc line 2101" 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.
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.

Notes


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