Monday, March 15, 2021

PHP: short_open_tag Not working in php 5.3.1


<? ?> tags not working in php 5.3.1

Issue/problem

I just installed php 5.3.1 in server and now my old work which I used to write with <? ?>  tags is not working at all..
Solution:

WAMP Server 
  1. Click on the wampserver tray icon.
  2. Go to PHP. Then PHP Settings
  3. Click short open tag. (When it's on it will have a checkmark next to it.)
XAMPP

If you are using xampp in windows then please do following

  1. Open XAMPP control panel.
  2. Click on CONFIG button.
  3. Go to PHP (php.ini) option.

Find short_open_tag using ctrl+f utility

You will found ;short_open_tag

kindly remove the semicolon (;) from line.

and keep it as short_open_tag = on

Finally, restart your Apache server


If you use wamp or xamp or iis 7 -> php manger , it's really easy to activate them. Just click on icon->php server->setting->allow short tag open

No comments: