tags:

views:

378

answers:

3

I just installed php 5.3.0 and it won't run php scripts utilizing short open tags like <?, only <?PHP

+11  A: 

You need to update your php.ini file.

Set short_open_tag = 1

See the PHP Manual

Sean Vieira
Well 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!
Mike
+7  A: 

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
there's nothing inherently wrong with shorthand.
pxl
Short 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
+3  A: 

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