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