Title: Plugin can&#039;t activate: unexpected T_STRING error
Last modified: September 1, 2016

---

# Plugin can't activate: unexpected T_STRING error

 *  Resolved [adrh](https://wordpress.org/support/users/adrh/)
 * (@adrh)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-cant-activate-unexpected-t_string-error/)
 * Hi there,
 * We’d really like to use your Simply Static plugin on our [site](http://overdrive.co.za/).
   But when we try to activate the plugin, we get the following error message:
 * “Plugin could not be activated because it triggered a fatal error.
 * “Parse error: syntax error, unexpected T_STRING in …/plugins/simply-static/includes/
   libraries/PhpSimple/HtmlDomParser.php on line 3.”
 * This is the code in the mentioned file, with **namespace Sunra\PhpSimple;** being
   on line 3.
 *     ```
       <?php
   
       namespace Sunra\PhpSimple;
   
       require 'simplehtmldom_1_5'.DIRECTORY_SEPARATOR.'simple_html_dom.php';
   
       class HtmlDomParser {
   
       	/**
       	 * @return \simplehtmldom_1_5\simple_html_dom
       	 */
       	static public function file_get_html() {
       		return call_user_func_array ( '\simplehtmldom_1_5\file_get_html' , func_get_args() );
       	}
   
       	/**
       	 * get html dom from string
       	 * @return \simplehtmldom_1_5\simple_html_dom
       	 */
       	static public function str_get_html() {
       		return call_user_func_array ( '\simplehtmldom_1_5\str_get_html' , func_get_args() );
       	}
       }
       ```
   
 * We deactivated our other plugins to rule out any plugin conflict issues. We also
   deactivated our theme and tested the plugin with the Twenty Sixteen theme, but
   we still got the same error.
 * We were wondering if anyone has ever reported a similar issue, as we’d really
   appreciate it if you give us any advice on how to fix the problem?
 * Thanks
 * [https://wordpress.org/plugins/simply-static/](https://wordpress.org/plugins/simply-static/)

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

 *  [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * (@codeofconduct)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/plugin-cant-activate-unexpected-t_string-error/#post-8204781)
 * Hi adrh,
 * Have you tried visiting Simply Static’s Diagnostics page? Is everything green?
   It kind of sounds like you might be using a version of PHP prior to 5.3.
 * And thanks for the really thorough testing before reporting your issue (i.e. 
   disabling other plugins and themes). That really helps a bunch! Sorry I wasn’t
   able to get back to you sooner.
 * Best,
    Scott
 *  Thread Starter [adrh](https://wordpress.org/support/users/adrh/)
 * (@adrh)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/plugin-cant-activate-unexpected-t_string-error/#post-8205084)
 * Hi Scott,
 * Thanks for getting back to me.
 * Yes, it was an older version of PHP that was causing the problem. We’re now using
   PHP 5.6 and the plugin is working perfectly now!
 *  [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * (@codeofconduct)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/plugin-cant-activate-unexpected-t_string-error/#post-8207350)
 * Thanks great! Thanks for the response, adrh!

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

The topic ‘Plugin can't activate: unexpected T_STRING error’ is closed to new replies.

 * ![](https://ps.w.org/simply-static/assets/icon-256x256.png?rev=2443263)
 * [Simply Static - The Static Site Generator](https://wordpress.org/plugins/simply-static/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-static/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-static/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-static/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-static/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-static/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/plugin-cant-activate-unexpected-t_string-error/#post-8207350)
 * Status: resolved