UnixServerAdmin

Server Administration & Management

PHP Parse error: syntax error, unexpected T_STRING

If you see error PHP Parse error: syntax error, unexpected T_STRING on accessing your site.

This error is commonly caused because you have not have short_open_tag set in php.ini. Enabling this will solve your problem.

1) If you have a Suexec/suphp enabled on server server , then you can create php.ini file under document root and add following

short_open_tag = X

2) If Suexec/suphp is disabled then you can crate .htaccess file under document root and add following.

short_open_tag X

That’s all

Advertisements

February 2, 2011 - Posted by | PHP |

3 Comments »

  1. This is a great article. Thanks for making the effort to explain all this out for us. It’s a great help!

    Comment by Levi Recher | June 15, 2011 | Reply

  2. Whenever I study a topic I have no clue what i could find. I am so pleased to have stumbled upon this detailed writing as it correctly addresses the concerns I have in mind and also the unspoken concerns that i would’ve looked for in the future.

    Comment by clean water | June 16, 2011 | Reply

  3. I think you should use more images on your blog, but besides that, it is really great. Cheers.

    Comment by penis enlargement pills | August 14, 2011 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: