Is it possible to allow php in templates by default?
What is the reasoning behind needing to specifically grant access?
Thanks,
alvar
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
January 05, 2011 1:36pm
Subscribe [4]#1 / Jan 05, 2011 1:36pm
Is it possible to allow php in templates by default?
What is the reasoning behind needing to specifically grant access?
Thanks,
alvar
#2 / Jan 05, 2011 3:31pm
It has potential security implications if you allow low-privileged members of your site to edit templates.
#3 / Jan 05, 2011 4:19pm
Understood.
So again, is it possible to allow php in templates by default if one so chooses?
#4 / Jan 06, 2011 9:23am
Hi, Serendipity Creative. Yes, you can, but you’ll need to make a database change in order to do so.
ALTER TABLE `exp_templates` CHANGE `allow_php` `allow_php` CHAR( 1 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'y'NOTE: This is what I got when I changed the value of allow_php to be changed from n to y. Your milage may vary. I did this in PHPMyAdmin.
Before attempting, make sure to back up the exp_templates table.
Does that help?
#5 / Jan 11, 2011 8:09pm
Edit: Oops, nevermind. I misunderstood the original question.
#6 / Jan 12, 2011 9:07am
Serendipity, are you all set?