Title: Parse error: syntax error, unexpected T_STRING, expecting
Last modified: August 21, 2016

---

# Parse error: syntax error, unexpected T_STRING, expecting

 *  Resolved [bsimcha18](https://wordpress.org/support/users/bsimcha18/)
 * (@bsimcha18)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/)
 * HELP!!
    I can’t edit my wordpress site nor get into wordpress at all. I get the
   error: Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in/
   home/shosha5/public_html/backup2/wp-admin/includes/media.php on line 2070 I was
   able to get MY hosting company to help me get into my code and I see that line
   2070 is actually many lines and seems to be an ad. So it appears that my site
   was hacked. How do I remove this ad and get my site working?

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4430575)
 * You need to start working your way through these resources:
    [http://codex.wordpress.org/FAQ_My_site_was_hacked](http://codex.wordpress.org/FAQ_My_site_was_hacked)
   [http://wordpress.org/support/topic/268083#post-1065779](http://wordpress.org/support/topic/268083#post-1065779)
   [http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/](http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/)
   [http://ottopress.com/2009/hacked-wordpress-backdoors/](http://ottopress.com/2009/hacked-wordpress-backdoors/)
 * Anything less will probably result in the hacker walking straight back into your
   site again.
 * Additional Resources:
    [Hardening WordPress](http://codex.wordpress.org/Hardening_WordPress)
   [http://sitecheck.sucuri.net/scanner/](http://sitecheck.sucuri.net/scanner/) 
   [http://www.unmaskparasites.com/](http://www.unmaskparasites.com/) [http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.html](http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.html)
 *  Thread Starter [bsimcha18](https://wordpress.org/support/users/bsimcha18/)
 * (@bsimcha18)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4430609)
 * Thank you, esmi, for the info. I’ve already changed my password and will take
   steps to secure my site after it’s fixed. I didn’t see how to delete the code,
   unless I missed it in one of the links. Can I use delete the line that is supposed
   to be the problem?
    Thanks
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4430613)
 * Try reading the pages at the links I listed above.
 *  [akshay95](https://wordpress.org/support/users/akshay95/)
 * (@akshay95)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4431014)
 * Even i have a same probelem
    Parse error: syntax error, unexpected T_STRING, 
   expecting ‘)’ in /home/u300944044/public_html/wp-content/themes/the_affilate_store/
   adm/the_affilate_store.php on line 2325
 * Line Code-
    ‘name’ => ‘<script type=”text/javascript”> var _gaq = _gaq || [];
   _gaq.push([‘_setAccount’, ‘UA-44499420-2’]); _gaq.push([‘_trackPageview’]); (
   function() { var ga = document.createElement(‘script’); ga.type = ‘text/javascript’;
   ga.async = true; ga.src = (‘https:’ == document.location.protocol ? ‘[https://ssl&#8217](https://ssl&#8217);:‘
   [http://www&#8217](http://www&#8217);) + ‘.google-analytics.com/ga.js’; var s
   = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);})();
   </script>> Code Google Analytics Code’,
 *  [M](https://wordpress.org/support/users/beat-diabetes/)
 * (@beat-diabetes)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4431057)
 * I have the same issue. I can’t even go to wp-admin panel. I am new to this, please
   help!
 * Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’
 *  [deyi83](https://wordpress.org/support/users/deyi83/)
 * (@deyi83)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4431066)
 * I have the samae proble,
    This is the error
 * Parse error: syntax error, unexpected ‘your’ (T_STRING), expecting ‘]’ in /home/
   content/p3pnexwpnas01_data01/21/2221021/html/wp-content/themes/smartshop-pro/
   functions.php on line 207
 *  when I look in the file there is no 207 line!!! I dont know what to do and my
   website is totaly broken!
 * Help please!
 *  [Flawio](https://wordpress.org/support/users/flawio/)
 * (@flawio)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4431067)
 * Can you please check what is wrong in this syntax:
 * <?php
 * Include DirName(__FILE__) . ‘/includes/class.theme.php’;
 * $THEME = New WordPress\Theme\Gray_and_Square\Core;
 * Include DirName(__FILE__) . ‘/includes/class.bootstrap-wp-formats.php’;
    New 
   WordPress\Theme\Gray_and_Square\Bootstrap_WP_Formats;
 * /**************** Theme Check Fixes ****************/ return;
 * # The theme displays tags for posts in the single-post.php
    $fix = ‘the_tags()’;
 * # Of course the theme has an archive pagination
    $fix = ‘next_posts_link() and
   previous_posts_link()’;
 * # And of course comments pagination too
    $fix = ‘next_comments_link() and previous_comments_link()’;
 * I have information that problem is in line 5 (Parse error: syntax error, unexpected
   T_STRING in /home/spytko/public_html/wp-content/themes/gray-and-square/functions.
   php on line 5).
 * I have no idea what could be wrong in the code…

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

The topic ‘Parse error: syntax error, unexpected T_STRING, expecting’ is closed 
to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 6 participants
 * Last reply from: [Flawio](https://wordpress.org/support/users/flawio/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-3/#post-4431067)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
