Added a separate config for php api gen and updated the templates to fix a bug