Hello,

I'm running drupal 4.7RC-2 on a RH EL 4, Apache 2.0, PHP Version 4.3.9, MySQL 4.1.12

Also, I'm using about 50 contributed modules (4.7.x branch) and a few contributed modules from HEAD (actions, audio, cck, image, location, tinymce, video, workflow).

PROBLEM:

[1] Running as drupal 'root' user (id == 1) and 'Save permissions' button is clicked on /drupal/admin/access page:

Apache Error Log:
PHP Fatal error: Maximum execution time of 180 seconds exceeded in /var/www/html/drupal/includes/menu.inc on line 600, referer: http://XXX.XXX.XXX.XXX/drupal/admin/access/1

And this blank page source is returned:

<html><body></body></html>

However, the changes to the settings do get saved and can be accessed by clicking on the 'access control' submenu item under the 'administer' menu and then selecting the 'Permissions' tab.

[2] This also happens on /drupal/admin/modules after 'Save configuration' is clicked:

Apache Error Log:
PHP Fatal error: Maximum execution time of 180 seconds exceeded in /var/www/html/drupal/includes/menu.inc on line 603, referer: http://XXX.XXX.XXX.XXX/drupal/admin/modules

And this blank page source is returned:

<html><body></body></html>

Similarly, the changes to the settings do get saved and can be accessed by clicking on the 'modules' submenu item under the 'administer' menu.

[3] Further, this seems to happen on EVERY module setting configuration page which has a 'Save configuration' button. And again, the settings are recorded properly after the 'Save configuration' button is clicked, even though the script times out. In fact, this happens for every page accessible under the 'administer' menu, either directly as a subitem or under the 'settings' subitem.

Apache Error Log:
PHP Fatal error: Maximum execution time of 180 seconds exceeded in /var/www/html/drupal/includes/menu.inc on line 601, referer: http://XXX.XXX.XXX.XXX/drupal/admin/settings/pathauto

PHP Fatal error: Maximum execution time of 180 seconds exceeded in /var/www/html/drupal/includes/menu.inc on line 601, referer: http://XXX.XXX.XXX.XXX/drupal/admin/settings/feedback

PHP Fatal error: Maximum execution time of 180 seconds exceeded in /var/www/html/drupal/includes/menu.inc on line 601, referer: http://XXX.XXX.XXX.XXX/drupal/admin/forum/configure

.....

Note that this behaviour doesn't happen immediately, only after most of the modules have been enabled or access control is configured.

Any suggestions or help would be very much appreciated. My current workaround is to make the configuration selections to enable various modules, settings and access control, wait a bit for the timeout or just cancel the request and then use the submenu item on the administer menu to ensure the selection was in fact made.

Clearly, this is sub-optimal (and not much fun).

Thanks in advance!

Comments

drupallover-1’s picture

Folks,

After an afternoon of spelunking with the Zend Debugger, I discovered this:

Lines 600:622 of /drupal/includes/menu.inc:

    while (count($new_items)) {
      foreach($new_items as $mid => $item) {
        // If the item has a valid parent, save it
        if ($item['pid'] >= 0) {
          // The new menu ID gets passed back by reference as $item['mid']
          menu_save_item($item);
          // Fix parent IDs for the children of the menu item just saved
          if ($item['children']) {
            foreach ($item['children'] as $child) {
              if (isset($new_items[$child])) {
                $new_items[$child]['pid'] = $item['mid'];
              }
            }
          }
          // remove the item
          unset($new_items[$mid]);
        }
      }
    }
    // Rebuild the menu to account for the changes.
    _menu_build();
  }

The test @ line 603, if ($item['pid'] >= 0) was never succeeding since $item['pid'] was -411, therefore the unset($new_items[$mid]) @ line 615 would never get executed, and thus the condition of while loop @ line 600 would always be true.

I noticed that $item['path'] contained the string tagadelic/chunk/1 or tagadelic/chunk/2 as the while loop cycled.

So, the script would be in an infinite loop and eventually reach the 180 second max I have set in php.ini.

Simply removing the tagadelic module (DRUPAL-4-7 Branch) fixed the problem.

Of course, I have no idea why tagadelic caused this, merely the fact that removing tagadelic makes things all better.

Best Wishes on your own 4.7 drupal journey!

drupallover

p.s. Of course, without a full contributed module regression test, it would be quite difficult to determine exactly which module(s) might be problematic for the 4-7 Branch (and why), but hopefully this information will be of some help to others.

Bèr Kessels’s picture