ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label unexpected T_STRING. Show all posts
Showing posts with label unexpected T_STRING. Show all posts

2009/12/15

PHP Parse error: syntax error, unexpected T_STRING

If you receive such error in the error logs or in the browser please follow the steps below.

For non suexec/suphp servers

Create a htaccess file under the diretcory and add the code below

php_flag short_open_tag X

For suexec/suphp servers

Copy the server’s php.ini file under the diretcory and find for short_open_tag. Open the php.ini file and change it to

short_open_tag = X

Note :: The solution is valid only if you find the error due to line in your php/html file.
HTML Code:

xml version=”1.0″ encoding=”iso-8859-1″
OR
xml version=”1.0″ encoding=”UTF-8″