Project:Cache Router
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

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

<?php
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.
<?php
require drupal_get_path('module', 'cacherouter').'/Cache.php';
?>

didn't work, because of cacherouter design.
and option
<?php
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?

Comments

#1

Priority:minor» critical
Status:active» postponed (maintainer needs more info)

need more info because CR uses

<?php
require dirname(__FILE__) .'/Cache.php';
?>

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

#2

Status:postponed (maintainer needs more info)» patch (to be ported)

suggestion solution work just fine

I have did it as patch

AttachmentSize
CacheRouter.patch 119 bytes

#3

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

AttachmentSize
CacheRouter.patch 424 bytes

#4

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

<?php
require './Cache.php';
?>

Please try 5-dev version which already fixed, your patch against cvs will break things

<?php
require dirname(__FILE__) .'/Cache.php';
?>

Your problem caused by 5-beta9 which is

<?php
require 'Cache.php';
?>

#5

Status:needs review» closed (duplicate)

This is a duplicate of #564460: Class conflict, namespace collisions

#6

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

with DEV version this problem solved.

thanks.

#7

Status:closed (fixed)» closed (duplicate)

This is dup