I just installed php 5.3.0 and it won't run php scripts utilizing short open tags like <?, only <?PHP.
Asked
Active
Viewed 1,744 times
4
-
2http://stackoverflow.com/questions/880150/why-would-shorthand-php-opening-statements-not-be-working – neuroguy123 Oct 06 '09 at 19:54
3 Answers
17

Sean Vieira
- 155,703
- 32
- 311
- 293
-
1Well i'll be damned. I've been programming PHP for the past 12 years, i've done websites for major clients like McDonalds... I can't believe I forgot about "short_open_tag"!!!!!!!! Thanks Aberon! – Oct 06 '09 at 19:58
6
That's because it's simply a bad practice. I suggest re-converting all your scripts to use <?php
. If you're lazy, you can use a find and replace, if you have access to powerful command lines like bash you can use sed to do this for you.

meder omuraliev
- 183,342
- 71
- 393
- 434
-
1Short opening tags are great for templates (and for non-template code you should only have the one opening tag at the beginning) – Bart van Heukelom Nov 30 '09 at 15:32
4
http://us2.php.net/manual/en/ini.core.php
you need to
ini_set("short_open_tag", 1)
or adjust your systems php.ini file.

kristofer
- 147
- 7