Title: Parse error: parse error, unexpected T_VARIABLE in  config.php file
Last modified: August 19, 2016

---

# Parse error: parse error, unexpected T_VARIABLE in config.php file

 *  [CoachFletch](https://wordpress.org/support/users/coachfletch/)
 * (@coachfletch)
 * [17 years ago](https://wordpress.org/support/topic/parse-error-parse-error-unexpected-t_variable-in-configphp-file/)
 * My blog was working just fine for a week. Using WP 2.7.1
 * I now receive this error when I try to log in to the admin area and when I view
   my blog.
 * **Parse error: parse error, unexpected T_VARIABLE in /home/content/d/a/l/dalefletcher3/
   html/new/wp-config.php on line 1**
 * Any solutions or explanation on why this may have occured?
 * Thanks

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [17 years ago](https://wordpress.org/support/topic/parse-error-parse-error-unexpected-t_variable-in-configphp-file/#post-1039686)
 * Could be a hack or could just be a corrupted file. I’ve had the latter happen
   ion rare occasions for no obvious reason. Do you have a copy of your original
   wp-config file? Or could you re-create it using the wp-config-sample file that’s
   bundled in with the WP download?
 *  Thread Starter [CoachFletch](https://wordpress.org/support/users/coachfletch/)
 * (@coachfletch)
 * [17 years ago](https://wordpress.org/support/topic/parse-error-parse-error-unexpected-t_variable-in-configphp-file/#post-1039734)
 * I am suspecting it is a hack. I looked at the directories and files with my FTP
   and I have found 20 files that have the exact same code as the config file.
 * Dale
 *  [designandpromote](https://wordpress.org/support/users/designandpromote/)
 * (@designandpromote)
 * [17 years ago](https://wordpress.org/support/topic/parse-error-parse-error-unexpected-t_variable-in-configphp-file/#post-1039758)
 * I had the same problem on 15 of the blogs I manage. I found that my client has
   a spyware program that phoned home his password and some script must have added
   the bad code to the blog. It took me a bit to figure out the solution but here’s
   the cure. [http://www.designandpromote.com/parse-error-syntax-error-unexpected-t_variable-solved/](http://www.designandpromote.com/parse-error-syntax-error-unexpected-t_variable-solved/)

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

The topic ‘Parse error: parse error, unexpected T_VARIABLE in config.php file’ is
closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [designandpromote](https://wordpress.org/support/users/designandpromote/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/parse-error-parse-error-unexpected-t_variable-in-configphp-file/#post-1039758)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
