I installed ldap-7.x-2.x-dev on March 7, 2014 and tried to update (probably from beta8). When I called update.php, it failed with an out-of-memory error on line 290:

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: https://example.com/drupal7/update.php?op=selection&token=C5MgjfwTnf_dmU... StatusText: OK ResponseText: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 65488 bytes) in /usr/local/apache2/drupal7/sites/all/modules/ldap/ldap_servers/ldap_servers.install on line 290

The problem is that the function ldap_servers_db_field_exists is calling itself internally, rather than db_field_exists. I'm trying to make a patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

limako’s picture

Assigned: Unassigned » limako
Status: Needs work » Fixed
FileSize
595 bytes

I've attached a patch that fixes the problem -- my first one!

limako’s picture

Status: Fixed » Needs review
nbooks’s picture

This patch worked for me, thank you very much!

szume’s picture

It worked for me too, thank you!

greg.harvey’s picture

Status: Needs review » Reviewed & tested by the community

+1

Seems to work for enough people to warrant a R&TBC?

nicorac’s picture

+1 for me too.

Since this error raises on AJAX calls within update.php, it took a lot of time to me to find the culprit (ldap_server module). Hope an update will be released soon...

There's another issue into update #7108:

ldap_servers_ldap_servers_db_field_exists()

should read

ldap_servers_db_field_exists()

And another into #7206:

  db_add_field(
    'ldap_servers',
    'followrefs',
    array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    )
  );

should read

  if (!ldap_servers_db_field_exists('ldap_servers', 'followrefs')) {
    db_add_field(
      'ldap_servers',
      'followrefs',
      array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => FALSE,
        'default' => 0,
      )
    );
  }
johnbarclay’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. I committed these 2 patches.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.