Problem/Motivation

On a site I am managing, I found an issue when using ldap_sso and Redis together:

Got error 'PHP message: PHP Fatal error: Cannot redeclare drupal_path_initialize() (previously declared in .../includes/path.inc:18) in .../all/modules/contrib/redis/redis.path.inc on line 40\n'

At a fist sight it seems to be a Redis error, but after few hours of debug I discovered that the issue comes from the line:

require_once(DRUPAL_ROOT . '/includes/path.inc');

Proposed resolution

To solve the issue we simply have to load the declared variable from the registry:

require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc');

I prepared a simple patch and thanks for the incredibly useful module.

Comments

denix created an issue. See original summary.

denix’s picture

denix’s picture

Status: Active » Needs review

Status: Needs review » Needs work
denix’s picture

My bad. The patch cannot be tested with dev, as ldap_sso does not exist anymore.

denix’s picture

Status: Needs work » Needs review
grahl’s picture

Title: Error: "Cannot redeclare drupal_path_initialize() (previously declared in .../includes/path.inc:18)" » Error Cannot redeclare drupal_path_initialize()
Project: Lightweight Directory Access Protocol » LDAP Single Sign On
Version: 7.x-1.0-beta14 » 7.x-2.x-dev
Assigned: denix » Unassigned
Issue tags: -ldap, -cache, -redis

Status: Needs review » Needs work
denix’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Needs work » Closed (outdated)

hi @grahl, thanks for moving the issue. However LDAP_SSO 7.x-2.x is already using the right declaration.

I am closing this issue as outdated (version 7.x-1.x) and it will stay as documentation.

There are still many installation running LDAP 7.x-1.0-beta14 in the wild, maybe one day somebody will publish a 7.x-1.0 stable version of the original module and I hope they will include this patch.

grahl’s picture

Status: Closed (outdated) » Fixed

Hi denix

Thanks for the detailed feedback. Since this is just a backport I committed your patch to the 1.x branch.

Please note though that a stable 1.0 release is extremely unlikely, as the LDAP project page indicates, please upgrade if possible. And FYI: closed issues are usually never looked at again, by choosing that it's highly likely hat a patch would be overlooked.

Status: Fixed » Closed (fixed)

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