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
Comment #2
denix commentedComment #3
denix commentedComment #5
denix commentedMy bad. The patch cannot be tested with dev, as ldap_sso does not exist anymore.
Comment #6
denix commentedComment #7
grahlComment #9
denix commentedhi @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.
Comment #10
grahlHi 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.