using now php to for script templates, fix #1