I have recently installed Win8 on my computer. Then I instaled wamp 2.2 with php 5.4 and I am unable to make short tag work.
I have already put:
Change the value of short_open_tag
to On
.
And if your php.ini
file is located in /etc/php/5.6/fpm
you need to restart the php5.6-fpm
service with
sudo service php5.6-fpm restart
I had the same problem recently after upgrading from PHP 5.3.18
to PHP 5.5.9.
.
I realized that for some reason, short_open_tag
was appearing in my php.ini file twice.
If you did a find to get to that part of your php.ini
file, try continuing the find to see if there is another instance.
Make sure to replace all
short_open_tag
occurrences within the php.ini file. In my case there were multiple places where it was defined. For me, the wrong setting was located under
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;
Set the :
asp_tags = On and short_open_tag = On
in both the files \apache\Apache2.2.22\bin\php.ini and \bin\php\php5.4\php.ini and then restart the apache server.
If you don't have access to the php.ini you can try to enable them trough the .htaccess file but it's possible the hosting company disabled this if you are on shared hosting:
php_value short_open_tag 1
Remember to restart your service (apache2, etc) for the edits to php.ini to take effect.