PHP ERROR – parse error unexpected t_string

If you get this error in the error log :

” PHP Parse error: syntax error, unexpected T_STRING”

Then just add the following code in the .htaccess file.

====================
php_flag short_open_tag X
====================
Or
If  the server is SuExec enabled  server then you can add the following code in the “php.ini” file

short_open_tag = X
====================================================

That’s all this will do it.

PHP Redirection Code

How to redirect index.php page to another URL   by using php code .

Just add the following code in the Index.php  file.

===============================================

<?php
header( ‘Location: http://www.domain.com/pagetoredirect.html’ ) ;
?>
===============================================
Note : Replace “http://www.domain.com/pagetoredirect.html” with exact URL on which you want to redirect your  index page .

That’s all this will do it.

How to Restart Tomact Service

To restart Tomcat Service just run the following commands :

[email protected][~]# /usr/local/jakarta/tomcat/bin/./shutdown.sh
[email protected][~]# /usr/local/jakarta/tomcat/bin/./startup.sh
[email protected][~]# /usr/local/jakarta/tomcat/bin/./catalina.sh run

[email protected][~]# /scripts/restartsrv_tomcat

That’s all this will do it.