Starting to fix php issues

Moving to use full php tags
Adding Globals correctly
Moved config to sample.config.php