Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have copied some code from one Linux server to my windows machine.
When i execute it i have to put <?php instead of <? for the code to run ???
is there any way to change this in wondows ?

share|improve this question
If this is your code, then for the best level of compatibility you suggest that you should avoid using short open tags. It is disabled in many places. It can be problematic if you have XML files stored or used anywhere. – Zoredache Nov 22 '10 at 20:09
up vote 3 down vote accepted

Change the short_open_tag directive in your php.ini file to On and restart your web server.

As Zoredache pointed out, for greatest compatibility you should always use <?php tags in your own code, and lobby developers who use short tags to do it properly and stop being lazy.

share|improve this answer
agreed but it's quite old code and modifying would take some time :)) 10x for the heads up – s.mihai Nov 22 '10 at 20:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.