{"id":13137,"date":"2017-09-14T12:25:11","date_gmt":"2017-09-14T12:25:11","guid":{"rendered":"https:\/\/www.awardspace.com\/?page_id=13137"},"modified":"2022-10-11T10:54:57","modified_gmt":"2022-10-11T10:54:57","slug":"syntax-error-unexpected-t-string","status":"publish","type":"post","link":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/","title":{"rendered":"\u201cParse error: syntax error, unexpected T_STRING\u201d error appears on my website"},"content":{"rendered":"<p>In this tutorial, we&#8217;re going to provide details regarding the error message <strong>syntax error, unexpected T_STRING<\/strong>, including the meaning and ways to fix it.<\/p>\n<p>&nbsp;<\/p>\n<h2>What Does the Error Mean?<\/h2>\n<p>The error message <strong>Parse error: syntax error, unexpected T_STRING<\/strong> usually appears when a .html file starts with an <span style=\"color: #327eb9;\"><strong><code>&lt;?<\/code><\/strong><\/span> tag. This confuses our Apache web server when attempting to execute the code as it is a PHP script.<\/p>\n<p><a class=\"et_pb_lightbox_image\" title=\"syntax error\" href=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-1.png\" data-featherlight=\"image\"> <img decoding=\"async\" class=\"size-full wp-image-15434 aw-border-img alignnone\" src=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-1.png\" alt=\"syntax-error-unexpected-t-string 1\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>How Can I Overcome this Problem?<\/h2>\n<p>This issue can be easily resolved in five easy steps:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"\/user-login\/\">Log into your AwardSpace hosting account<\/a>.<\/li>\n<li>Visit the PHP Settings <a href=\"https:\/\/cp1.awardspace.net\/beta\/php-settings\/\">section<\/a>.<\/li>\n<li>Click on the <strong><u>here<\/u><\/strong> button.<\/li>\n<li>Locate the line <span style=\"color: #327eb9;\"><strong><code>short_open_tag = On<\/code><\/strong><\/span> and change it to <span style=\"color: #327eb9;\"><strong><code>short_open_tag = Off<\/code><\/strong><\/span> .<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a class=\"et_pb_lightbox_image\" title=\"syntax error\" href=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-2.png\" data-featherlight=\"image\"> <img decoding=\"async\" class=\"size-full wp-image-15434 aw-border-img alignnone\" src=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-2.png\" alt=\"syntax-error-unexpected-t-string 2\" \/> <\/a><\/p>\n<p>Press Save to save the changes you have just made.<\/p>\n<p>&nbsp;<\/p>\n<h2>What If I Do Not Have Access to the PHP.ini File? Am I Still Able to Fix the Error?<\/h2>\n<p>If, for some reason, you&#8217;re unable to access the PHP.ini section or your account type does not give you enough rights to modify the PHP.ini file, you can still resolve the error with the use of a text file, called <strong>.htaccess<\/strong>.<\/p>\n<p>The steps you need to perform are the following:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Sign in to your Hosting Control Panel.<\/li>\n<li>Navigate to the File Manager <a href=\"https:\/\/cp1.awardspace.net\/beta\/file-manager\/\">section<\/a>.<\/li>\n<li>Create a <strong>.htaccess<\/strong> file in your domain directory with the below code:<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><strong><code>RemoveHandler .html .htm<\/code><\/strong><\/p>\n<p>The screenshot below illustrates how your code should look like:<\/p>\n<p><a class=\"et_pb_lightbox_image\" title=\"syntax error\" href=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-3.png\" data-featherlight=\"image\"> <img decoding=\"async\" class=\"size-full wp-image-15434 aw-border-img alignnone\" src=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-3.png\" alt=\"syntax-error-unexpected-t-string 3\" \/> <\/a><\/p>\n<p>After you follow the above steps, clear your browser&#8217;s cache, and then reload your HTML page. No further parse errors will appear when visiting your website in a browser.<\/p>\n<p><a class=\"et_pb_lightbox_image\" title=\"syntax error\" href=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-4.png\" data-featherlight=\"image\"> <img decoding=\"async\" class=\"size-full wp-image-15434 aw-border-img alignnone\" src=\"\/wp-content\/uploads\/2018\/02\/syntax-error-unexpected-t-string-4.png\" alt=\"syntax-error-unexpected-t-string 4\" \/> <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we&#8217;re going to provide details regarding the error message syntax error, unexpected T_STRING, including the meaning and ways to fix it. &nbsp; What Does the Error Mean? The error message Parse error: syntax error, unexpected T_STRING usually appears when a .html file starts with an &lt;? tag. This confuses our Apache web [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":33819,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[13],"tags":[],"class_list":["post-13137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting-basics"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Unexpected T_STRING | AwardSpace.com<\/title>\n<meta name=\"description\" content=\"In this tutorial, we\u2019re going to provide details regarding the error message Parse error: syntax error, unexpected T_STRING, including meaning and ways to fix it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unexpected T_STRING | AwardSpace.com\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we\u2019re going to provide details regarding the error message Parse error: syntax error, unexpected T_STRING, including meaning and ways to fix it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/\" \/>\n<meta property=\"og:site_name\" content=\"AwardSpace.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AwardSpace\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-14T12:25:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-11T10:54:57+00:00\" \/>\n<meta name=\"author\" content=\"ivailod\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@awspace\" \/>\n<meta name=\"twitter:site\" content=\"@awspace\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ivailod\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/\"},\"author\":{\"name\":\"ivailod\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/ce135bfb9f8b0d51d047abe11d77b221\"},\"headline\":\"\u201cParse error: syntax error, unexpected T_STRING\u201d error appears on my website\",\"datePublished\":\"2017-09-14T12:25:11+00:00\",\"dateModified\":\"2022-10-11T10:54:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/\"},\"wordCount\":268,\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Hosting Basics\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/\",\"url\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/\",\"name\":\"Unexpected T_STRING | AwardSpace.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2017-09-14T12:25:11+00:00\",\"dateModified\":\"2022-10-11T10:54:57+00:00\",\"description\":\"In this tutorial, we\u2019re going to provide details regarding the error message Parse error: syntax error, unexpected T_STRING, including meaning and ways to fix it.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.awardspace.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\/\/www.awardspace.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Hosting Basics\",\"item\":\"https:\/\/www.awardspace.com\/kb\/hosting-basics\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u201cParse error: syntax error, unexpected T_STRING\u201d error appears on my website\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.awardspace.com\/#website\",\"url\":\"https:\/\/www.awardspace.com\/\",\"name\":\"AwardSpace.com\",\"description\":\"Free Web Hosting with PHP, MySQL, Email Sending, No Ads\",\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.awardspace.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.awardspace.com\/#organization\",\"name\":\"AwardSpace.com\",\"url\":\"https:\/\/www.awardspace.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"contentUrl\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"width\":1759,\"height\":176,\"caption\":\"AwardSpace.com\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/AwardSpace\/\",\"https:\/\/x.com\/awspace\",\"https:\/\/www.instagram.com\/awardspace\/\",\"https:\/\/www.quora.com\/profile\/Award-Space\",\"https:\/\/www.linkedin.com\/company\/19214384\/\",\"https:\/\/www.reddit.com\/user\/AwardSpace\",\"https:\/\/www.pinterest.com\/awardspace\/\",\"https:\/\/www.youtube.com\/user\/AwardspaceWebHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/ce135bfb9f8b0d51d047abe11d77b221\",\"name\":\"ivailod\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"ivailod\"},\"url\":\"https:\/\/www.awardspace.com\/author\/ivailod\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unexpected T_STRING | AwardSpace.com","description":"In this tutorial, we\u2019re going to provide details regarding the error message Parse error: syntax error, unexpected T_STRING, including meaning and ways to fix it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/","og_locale":"en_US","og_type":"article","og_title":"Unexpected T_STRING | AwardSpace.com","og_description":"In this tutorial, we\u2019re going to provide details regarding the error message Parse error: syntax error, unexpected T_STRING, including meaning and ways to fix it.","og_url":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/","og_site_name":"AwardSpace.com","article_publisher":"https:\/\/www.facebook.com\/AwardSpace\/","article_published_time":"2017-09-14T12:25:11+00:00","article_modified_time":"2022-10-11T10:54:57+00:00","author":"ivailod","twitter_card":"summary_large_image","twitter_creator":"@awspace","twitter_site":"@awspace","twitter_misc":{"Written by":"ivailod","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#article","isPartOf":{"@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/"},"author":{"name":"ivailod","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/ce135bfb9f8b0d51d047abe11d77b221"},"headline":"\u201cParse error: syntax error, unexpected T_STRING\u201d error appears on my website","datePublished":"2017-09-14T12:25:11+00:00","dateModified":"2022-10-11T10:54:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/"},"wordCount":268,"publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"image":{"@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage"},"thumbnailUrl":"","articleSection":["Hosting Basics"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/","url":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/","name":"Unexpected T_STRING | AwardSpace.com","isPartOf":{"@id":"https:\/\/www.awardspace.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage"},"image":{"@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage"},"thumbnailUrl":"","datePublished":"2017-09-14T12:25:11+00:00","dateModified":"2022-10-11T10:54:57+00:00","description":"In this tutorial, we\u2019re going to provide details regarding the error message Parse error: syntax error, unexpected T_STRING, including meaning and ways to fix it.","breadcrumb":{"@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.awardspace.com\/kb\/syntax-error-unexpected-t-string\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.awardspace.com\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/www.awardspace.com\/kb\/"},{"@type":"ListItem","position":3,"name":"Hosting Basics","item":"https:\/\/www.awardspace.com\/kb\/hosting-basics\/"},{"@type":"ListItem","position":4,"name":"\u201cParse error: syntax error, unexpected T_STRING\u201d error appears on my website"}]},{"@type":"WebSite","@id":"https:\/\/www.awardspace.com\/#website","url":"https:\/\/www.awardspace.com\/","name":"AwardSpace.com","description":"Free Web Hosting with PHP, MySQL, Email Sending, No Ads","publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.awardspace.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.awardspace.com\/#organization","name":"AwardSpace.com","url":"https:\/\/www.awardspace.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","contentUrl":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","width":1759,"height":176,"caption":"AwardSpace.com"},"image":{"@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/AwardSpace\/","https:\/\/x.com\/awspace","https:\/\/www.instagram.com\/awardspace\/","https:\/\/www.quora.com\/profile\/Award-Space","https:\/\/www.linkedin.com\/company\/19214384\/","https:\/\/www.reddit.com\/user\/AwardSpace","https:\/\/www.pinterest.com\/awardspace\/","https:\/\/www.youtube.com\/user\/AwardspaceWebHosting"]},{"@type":"Person","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/ce135bfb9f8b0d51d047abe11d77b221","name":"ivailod","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"ivailod"},"url":"https:\/\/www.awardspace.com\/author\/ivailod\/"}]}},"_links":{"self":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/13137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/comments?post=13137"}],"version-history":[{"count":0,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/13137\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/media?parent=13137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/categories?post=13137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/tags?post=13137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}