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" only available to super admin?

September 05, 2011 6:45pm

Subscribe [1]
  • #1 / Sep 05, 2011 6:45pm

    Will Smith

    76 posts

    Hi all,

    I am having our web developer do some EE templates that require PHP. When he goes into Template Preferences to turn on PHP for a given template, the typical “Allow PHP?” and “PHP Parsing Stage” options are not there (see screenshot attached).

    He is not in our super admin member group but instead in one called “IT”, whose permissions I setup. I have given him lots of permissions, all carefully chosen. I didn’t see a permission to allow/disallow the toggling of PHP parsing on templates.

    So why can’t he turn on/off PHP parsing in his templates? Can only super admins do that, even if he is the creator of the templates?

    ExpressionEngine 1.7.1, Build 20110520.

    Thank you,

    Will

  • #2 / Sep 06, 2011 2:45pm

    Lisa Wess

    20502 posts

    Hi Will Smith,

    Because allowing PHP essentially opens up a template to do almost anything to your installation, that setting is a bit more restricted.  I believe that it is in fact limited to Super Admins only, but it’s been awhile since I double checked so I can go make sure of that.  I’ll confirm once I am positive.

    Thank you!

  • #3 / Sep 06, 2011 4:10pm

    Lisa Wess

    20502 posts

    ... and confirmed. Here’s the code that is limiting to to Super Admins:

    if ($this->session->userdata['group_id'] == 1)
            {
                $headings[] = array('allow_php', lang('enable_php').' <span class="notice">*</span>');
                $headings[] = array('php_parse_location', lang('parse_stage'));
            }

    Does that help explain?

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

ExpressionEngine News!

#eecms, #events, #releases