I read online this happened to others so I increase my memory to php using memory_limit = 128M and still I get an error 500. I can see the people but as soon as I click on permissions, nothing.

Comments

Sam Moore’s picture

If you're getting 500 errors, you should look in the Apache error log (or wherever your system puts PHP errors) and see if there's any detail.

There are other resource limits to PHP besides memory.
You may need to increase one of those - for example max_input_vars, which can easily get overloaded if you have a lot of perms. It regulates how many items get sent along with your POST; I've seen it give trouble on submission of the permissions form, but maybe it could act up on page load too.
Default is 1000; try setting it to 2000.
Restart Apache afterwards.

hsimard’s picture

Tried all that and still not working. I got more info about the error:

PHP Fatal error: Unsupported operand types in /home/*****/public_html/modules/user/user.admin.inc on line 712, referer: http://www.****.ca/user/1

I replaced the actual site and folder name with **** for security. When I look at the code, this is what it refers to...

foreach ($modules as $module => $display_name) {
if ($permissions = module_invoke($module, 'permission')) {
$form['permission'][] = array(
'#markup' => $module_info[$module]['name'],
'#id' => $module,
); ---- this is the line they referring too ---
foreach ($permissions as $perm => $perm_item) {
// Fill in default values for the permission.
$perm_item += array(
'description' => '',
'restrict access' => FALSE,
'warning' => !empty($perm_item['restrict access']) ? t('Warning: Give to trusted roles only; this permission has security implications.') : '',
);
$options[$perm] = '';
$form['permission'][$perm] = array(
'#type' => 'item',
'#markup' => $perm_item['title'],
'#description' => theme('user_permission_description', array('permission_item' => $perm_item, 'hide' => $hide_descriptions)),
);
foreach ($role_names as $rid => $name) {
// Builds arrays for checked boxes for each role
if (isset($role_permissions[$rid][$perm])) {
$status[$rid][] = $perm;
}
}
}
}
}

Sam Moore’s picture

In that case you've probably got a buggy module that's passing a malformed permissions object to the function you've quoted.
Try disabling contrib modules - especially anything you've recently installed.
https://www.drupal.org/node/1036262

hsimard’s picture

Found the bad module. Thanks again for the help!!

Sam Moore’s picture

My pleasure. Please pay it forward by helping others where you can.
You might also edit your original post to include [SOLVED] in the subject line- this will help future Googlers.