Sorry to jump in, but I may be able to help with this one.
Is that the actual code you are using for PHP? Using "<?" to open a PHP block is a shortcut, and the server needs to be configured to read that....You would need to have PHP Short Tags enabled in your PHP INI file on your local server for that to work.
I would recommend not using short tags. You already found out why - they don't always work the same on differently configured servers. Use the FULL PHP Tag to open a PHP block "<?php"... Any PHP system can read that one and it's only 3 more characters...
Just my 2 cents...