“Parse error: syntax error, unexpected T_STRING” error appears on my website

Home » Knowledge Base » Hosting Basics » “Parse error: syntax error, unexpected T_STRING” error appears on my website

In this tutorial, we’re going to provide details regarding the error message syntax error, unexpected T_STRING, including the meaning and ways to fix it.

 

What Does the Error Mean?

The error message Parse error: syntax error, unexpected T_STRING usually appears when a .html file starts with an <? tag. This confuses our Apache web server when attempting to execute the code as it is a PHP script.

syntax-error-unexpected-t-string 1

 

How Can I Overcome this Problem?

This issue can be easily resolved in five easy steps:

    1. Log into your AwardSpace hosting account.
    2. Visit the PHP Settings section.
    3. Click on the here button.
    4. Locate the line short_open_tag = On and change it to short_open_tag = Off .

syntax-error-unexpected-t-string 2

Press Save to save the changes you have just made.

 

What If I Do Not Have Access to the PHP.ini File? Am I Still Able to Fix the Error?

If, for some reason, you’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 .htaccess.

The steps you need to perform are the following:

    1. Sign in to your Hosting Control Panel.
    2. Navigate to the File Manager section.
    3. Create a .htaccess file in your domain directory with the below code:

RemoveHandler .html .htm

The screenshot below illustrates how your code should look like:

syntax-error-unexpected-t-string 3

After you follow the above steps, clear your browser’s cache, and then reload your HTML page. No further parse errors will appear when visiting your website in a browser.

syntax-error-unexpected-t-string 4

Was this post helpful?

i

Relevant tags:

Connect

Latest posts:

How to Log in to Zenphoto

Zenphoto is a handy CMS that helps you build a beautiful and fully functional gallery website. The app is widely used, thanks to its ease of use and great versatility. In another article, we shared how you can install Zenphoto on any of the AwardSpace hosting plans,...

How to Insall Zenphoto

Zenphoto is a handy CMS that allows you to build a gallery-based website. The platform is easy to use and has many features that allow you to manage your online gallery in numerous ways. Zenphoto comes as a free feature with each AwardSpace hosting plan, and you can...

How to Log in to TYPO3

TYPO3 is a powerful CMS platform that allows you to build a fully functional and aesthetically pleasing website. The platform is known for its versatility and long list of features. In another article, we shared how you can install TYPO3 on any of the AwardSpace...

How to Install TYPO3

You can install TYPO3 on all the AwardSpace hosting services—free web hosting, shared hosting, and premium plans such as Semi-Dedicated Hosting and VPS hosting. All AwardSpace hosting services are tailored to run TYPO3 smoothly, regardless of your website’s size or...

How to Add Products to Zen Cart: A Step-By-Step Guide

After you install Zen Cart and log in to the admin panel, you can start adding products to your online store. This guide walks you through the process step by step.   How to Add Products to Zen Cart To add a product to Zen Cart, you need to follow a few simple...



Create a website for free!


Free forever

Our Support Team is Here to Help

 

If you need any questions answered, don't hesitate and contact us. Click the button below and follow the instructions. You can expect an answer within an hour.

 

Contact AwardSpace

 

iNewest knowledge base articles

How to Log in to Zenphoto

Zenphoto is a handy CMS that helps you build a beautiful and fully functional gallery website. The app is widely used, thanks to its ease of use and great versatility. In another article, we shared how you can install Zenphoto on any of the AwardSpace hosting plans,...

How to Insall Zenphoto

Zenphoto is a handy CMS that allows you to build a gallery-based website. The platform is easy to use and has many features that allow you to manage your online gallery in numerous ways. Zenphoto comes as a free feature with each AwardSpace hosting plan, and you can...

How to Log in to TYPO3

TYPO3 is a powerful CMS platform that allows you to build a fully functional and aesthetically pleasing website. The platform is known for its versatility and long list of features. In another article, we shared how you can install TYPO3 on any of the AwardSpace...

How to Install TYPO3

You can install TYPO3 on all the AwardSpace hosting services—free web hosting, shared hosting, and premium plans such as Semi-Dedicated Hosting and VPS hosting. All AwardSpace hosting services are tailored to run TYPO3 smoothly, regardless of your website’s size or...

How to Add Products to Zen Cart: A Step-By-Step Guide

After you install Zen Cart and log in to the admin panel, you can start adding products to your online store. This guide walks you through the process step by step.   How to Add Products to Zen Cart To add a product to Zen Cart, you need to follow a few simple...

How to Log in to Zen Cart

Once you install Zen Cart, you can log in to the CMS and start working on your project. The login process is simple and is comprised of only a few steps.   How to Log in to Zen Cart There are two ways to log in to Zen Cart: Method 1: Login by following the...

Even more web tutorials

Check out our web hosting knowledge base and the WordPress tutorials to learn more, and be better prepared for your website creation and maintenance journey.