-2

Possible Duplicate:
How to enable PHP short tags?

I am doing some JavaScript work on a Wordpress based legacy side. I am trying to get the page to run on my dev machine (OS X Lion), but am encountering a problem with code in the template not being interpreted. The template contains some code tags that look like <? echo($subpage_title); ?>. Those don't get interpreted. If I replace that with <?php echo($subpage_title); ?>, it gets interpreted correctly. I don't really want to replace that everywhere and it obviously works on the production server. Is there any server setting I have to change for this to work?

This is probably a silly question, but I have practically no PHP experience and Google is not really helpful when looking for symbols.

Thank you very much for any help!

Community
  • 1
  • 1
ajmurmann
  • 1,605
  • 3
  • 16
  • 24

4 Answers4

5

Enable the setting called short_open_tag in the php.ini file.

John Kurlak
  • 6,594
  • 7
  • 43
  • 59
2

This is controlled by the PHP short_open_tag configuration value. Turn that on for your dev machine and you should be good.

2

The short_open_tag configuration setting should be a good start.

Kerrek SB
  • 464,522
  • 92
  • 875
  • 1,084
2

Check short_open_tag PHP.INI directive.

Yzmir Ramirez
  • 1,281
  • 7
  • 11