add handlers and templates for php