ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Allow php in templates by default?

January 05, 2011 1:36pm

Subscribe [4]
  • #1 / Jan 05, 2011 1:36pm

    alvarilio

    18 posts

    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

    Ingmar

    29245 posts

    It has potential security implications if you allow low-privileged members of your site to edit templates.

  • #3 / Jan 05, 2011 4:19pm

    alvarilio

    18 posts

    Understood.
    So again, is it possible to allow php in templates by default if one so chooses?

  • #4 / Jan 06, 2011 9:23am

    Sue Crocker

    26054 posts

    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

    mhulse

    329 posts

    Edit: Oops, nevermind. I misunderstood the original question.

  • #6 / Jan 12, 2011 9:07am

    Sue Crocker

    26054 posts

    Serendipity, are you all set?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases