Jun 08 2006

Drupal Unexpected T_CONSTANT_ENCAPSED_STRING


Categories:

What is T_CONSTANT_ENCAPSED_STRING?

This is a common PHP error resulting from mismatched strings or failing to terminate a line of code correctly. This is a fairly common error with new Drupal Installations and usually is due to an error in the file <root>/sites/default/settings.php.

What Causes The Error?

The T_CONSTANT_ENCAPSED_STRING error is often caused by accidentally deleting a single quote (') or semicolon (;) while modifying $db_url or $base_url in the file <root>/sites/default/settings.php. If your username or password contains a quote that may also produce this error.

How to Resolve This Error?

Simply add in the missing single quote (') or semicolon and reload the page that was giving you troubles (commonly reloading the root domain when attempting a new installation of Drupal). If that still doesn't work replace settings.php with the original file and add in your username, password, and database name again.

No votes yet
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Copy the characters (respecting upper/lower case) from the image.