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 fine except that an SQL statement is being rendered differently. I don't know if this has to do with the script beginning with <?php
instead of <?
because I don't know from where to enable the <?
from the PHP.ini
so I changed it to <?php
I know that these 2 statements are supposed to mean the same but I need to test it with <?
in order to ensure that the application is exactly the same. This way I can eliminate another possibility.
Thanks
you need to turn on short_open_tags.
In CentOS 6(tested on Centos 7 too) you can't set short_open_tag in /etc/php.ini for php-fpm. You will have error:
You must edit config for your site, which can found in /etc/php-fpm.d/www.conf And write at end of file:
Set
in php.ini
And restart your Apache server.
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
in
php.ini
And restart your Apache Server.