views:

542

answers:

4

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

+10  A: 

Set

short_open_tag=On

in php.ini

codaddict
If PHP runs as Apache module, you can also set it in a .htaccess file: php_flag short_open_tag on
Álvaro G. Vicario
+4  A: 

you need to turn on short_open_tags.

short_open_tag = On
Jage
+4  A: 

enable shorttags in the php.ini:

short_open_tag = on
RJD22
+3  A: 

Turn on short_open_tag

short_open_tag = On

Take note that using short_open_tag is not recommended. The PHP Group recommends you replace all short tags to <?php in order to ensure forward compatibility and to allow the use of the xml prelog <?xml ?>.

Plans are in motion to remove short tags in a future version of PHP (this was planned for PHP6, but plans were changed).

Andrew Moore