PEAR Cache_Lite have Cache.php, I use Cache_Lite in modules,
and because of line

require 'Cache.php';

in CacheRouter.php it is problem - cacherouter include Cache.php from PEAR package, if I change include_path Cache_Lite include Cache.php from cacherouter and it is problem again.

require drupal_get_path('module', 'cacherouter').'/Cache.php';

didn't work, because of cacherouter design.
and option

require getcwd().'sites/all/modules/cacheroter/Cache.php';

can not be provided as patch because of hardcoded path.
Any ideas how I can do acceptable patch for this issue?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Priority: Minor » Critical
Status: Active » Postponed (maintainer needs more info)

need more info because CR uses

require dirname(__FILE__) .'/Cache.php';

maybe your bug related #564460: Class conflict, namespace collisions

Alexander Kosarev’s picture

Status: Postponed (maintainer needs more info) » Patch (to be ported)
FileSize
119 bytes

suggestion solution work just fine

I have did it as patch

Alexander Kosarev’s picture

FileSize
424 bytes

previous path was created by "diff file file"
this one is by "diff -up file file"

andypost’s picture

Status: Patch (to be ported) » Needs review

@Alexander You does not understand me, cacherouter includes files from it's own folder.
dirname(__FILE__) returns cachetouter's folder, it's the same as
require './Cache.php';

Please try 5-dev version which already fixed, your patch against cvs will break things
require dirname(__FILE__) .'/Cache.php';

Your problem caused by 5-beta9 which is
require 'Cache.php';

slantview’s picture

Status: Needs review » Closed (duplicate)
Alexander Kosarev’s picture

Version: 5.x-1.0-beta9 » 5.x-1.x-dev
Status: Closed (duplicate) » Closed (fixed)

with DEV version this problem solved.

thanks.

andypost’s picture

Status: Closed (fixed) » Closed (duplicate)

This is dup