This issue does not effect user 1.

Fatal error: Maximum execution time of 30 seconds exceeded in /export/www/lib/sites/all/modules/groupadmin/groupadmin.access.inc.php on line 78

CommentFileSizeAuthor
#6 signature.png52.26 KBaddicted_to_drupal

Comments

andy inman’s picture

Is this reproducible? It's not a generic problem, perhaps configuration related. More info please.

bradspry’s picture

Discovered the issue after drush upgrading from 6.x-2.1 to 6.x-2.2-beta1. It was a regular upgrade process, no configuration change. Had to revert back to 6.x-2.1 after encountering this.

andy inman’s picture

Status: Active » Postponed (maintainer needs more info)

Looking at the groupadmin.access.inc.php, I can't imagine what might be happening. There are no loops in there nor other processing that I would expect might take considerable time. Waiting to see if there are any more reports - apparently there are 56 active installs of 2.2-beta1 and nobody else has reported this, so for now I assume it was some random error, possibly not actually related to GA.

cgmonroe’s picture

I am also seeing this problem with 2.2-beta1. Times out in groupadmin.access.inc.php... lines 80, 37, 36, and 78, even after I upped the timeout to 2 minutes.

This is happening anytime a normal user who has been "promoted" to group manager tries to access the Member panel.

I'm also using og_panels on this site. If it matters, there are about 70 members in the group.

This does not happen for "super" users... e.g. folks who can administer permissions or administer groupadmins.

Group admin access control permissions are:

Basic Access: admins
Show Admins: admins
Show Members: members
Show Non-Members: admins
Show E-mail: nobody
Show Real Names: nobody

More permissions checked.

andy inman’s picture

Ok, so at a guess it seems the loop in groupadmin.access.inc.php lines 77-81 is the culprit. Here are lines 68-81...

   $has_role = FALSE;

    // Check our global permissions...
    // Get array of all roles (in order of decreasing access.)
    $roles = _groupadmin_all_roles();
    // Get numeric key of the specified role - we will check from here down to zero ('manager').
    // In the event of invalid role-name in $role, this would just test 'manager', so that's ok.
    $n = array_search($role, $roles);
    // Loop, checking specified role and higher-access roles.
    while($n >= 0 && !$has_role) {
      $has_role = _groupadmin_user_access($roles[$n]);
      //drupal_set_message(sprintf('%s Check for %s as %s - %d', $gid, $role, $roles[$n], $has_role), 'error');
      $n--;
    }

Possibly, $n is NULL on entry, so the following might fix the bug...

   $has_role = FALSE;

    // Check our global permissions...
    // Get array of all roles (in order of decreasing access.)
    $roles = _groupadmin_all_roles();
    // Get numeric key of the specified role - we will check from here down to zero ('manager').
    // In the event of invalid role-name in $role, this would just test 'manager', so that's ok.
    $n = array_search($role, $roles);
    if ($n !== NULL) {
      // Loop, checking specified role and higher-access roles.
      while($n >= 0 && !$has_role) {
        $has_role = _groupadmin_user_access($roles[$n]);
        //drupal_set_message(sprintf('%s Check for %s as %s - %d', $gid, $role, $roles[$n], $has_role), 'error');
        $n--;
      }
  }
addicted_to_drupal’s picture

StatusFileSize
new52.26 KB

I had the same problem, i went on the net and after a lot pages i found this one

the soluce

And it works. You have to go one location of drupal/sites/default folder then found the file defaulf.setting and add new line on it

ini_set('max_execution_time', 0);

You can also use others one like
ini_set('session.cookie_lifetime', 2000000);
it's as you wish

I hope it help's you

andy inman’s picture

Increasing 'max_execution_time' is a work-around rather than a solution.

kfall’s picture

I fixed this with the following to allow for authenticated users without other roles, which would trigger the infinite loop condition.
groupadmin.access.inc.php
line 77:
//while($n >= 0 && !$has_role) {
while($n > 0 && !$has_role) {

andy inman’s picture

Hi kfall, the code *should* be executed for $n == 0 as well as higher values, and your change will bypass that state. I would suggest you use my fix from #5 instead.