I have a web application on a Linux server which starts with
I needed to copy this application to a windows environment and everything is working
short_open_tag = On
in php.ini
And restart your Apache Server.
if you edit your php.ini file, remember to restart your service (apache2, etc) for the edits to php.ini to take effect
if using xampp, you will notice the php.ini file has twice mentioned short_open_tag . Enable the second one to short_open_tag = On . The first one is commented out and you might be tempted to uncomment and edit it but it is over-ridden by a second short_open_tag
If you are using xampp in windows then please do following
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
sed -i "s/short_open_tag = .*/short_open_tag = On/" /etc/php/7.2/apache2/php.ini
That works on php7.2 on ubuntu 16, same answer as above by Bradley Flood, although the directory in which the config file is stored has changed.
Also you can change the version in the php string to match your currently installed version.
This can be done by enabling short_open_tag in php.ini:
1.To locate php.ini file,on comment line execute
php --ini
you will get some thing like this,
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/gd.ini,
/etc/php.d/json.ini,
/etc/php.d/mcrypt.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/zip.ini
See 2nd line from the comment output.The file will be in the mentioned path.
2.Open php.ini file and find short_open_tag
. By default it is in off
change it to on
.
3.Restart the server,execute this comment
service httpd restart
Thanks