Title: Config file -Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
Last modified: August 21, 2016

---

# Config file -Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

 *  [narelle@rellevance.com.au](https://wordpress.org/support/users/narellerellevancecomau/)
 * (@narellerellevancecomau)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/config-file-parse-error-syntax-error-unexpected-t_constant_encapsed_string/)
 * hi
    I have had a site go pear shaped from a plug in install and had to re-install
   wp files. inadvertently blew the config file away(please no comments I KNOW!)
   Have made a copy of the sample config file and entered the correct db details
   etc. and used the worpress salt kegen for the codes in there. Keep getting this
   error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/
   shanijae/public_html/wp-config.php on line 45 line 45 is the first line of the
   security codes.
 * I have retried this and made another copy of the sample config file and started
   from scratch and it has made no improvement.
 * Any ideas please????
 * thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/config-file-parse-error-syntax-error-unexpected-t_constant_encapsed_string/#post-4424836)
 * Parse errors
 * Syntax Error
 * A syntax error means that you have made a mistake while creating your PHP structure.
   You could, for example, be;
 * When this error appears it will tell you which file the error appears in (functions.
   php on line 45 for example) and approximately which line (it may not always be
   the exact line so be sure to check just before and just after) in the code.
 * Unexpected
 * If you are receiving an error which says ‘parse error: unexpected’ this usually
   means that you have forgotten to include a character.
 *  Thread Starter [narelle@rellevance.com.au](https://wordpress.org/support/users/narellerellevancecomau/)
 * (@narellerellevancecomau)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/config-file-parse-error-syntax-error-unexpected-t_constant_encapsed_string/#post-4424859)
 * thanks for the response. all code up to line 45 executes, as i did change the
   parameter immediately prior to line 45 and got a different error. Line 45 in 
   the beginning of the code generator security key, I have even tried leaving blank.
   I am assuming using a WP generated key, and tried several different ones just
   in case this should be fine….any other ideas to work around this?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Config file -Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING’
is closed to new replies.

## Tags

 * [config](https://wordpress.org/support/topic-tag/config/)
 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [narelle@rellevance.com.au](https://wordpress.org/support/users/narellerellevancecomau/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/config-file-parse-error-syntax-error-unexpected-t_constant_encapsed_string/#post-4424859)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
