NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR DB_Cache: is this a bug?

Ophir Prusak lists at prusak.com
Thu Feb 5 16:15:19 EST 2004


Hi David,

I never used pear's cache libs before, but have been thinking of using 
something like it.
I just checked your code on my machine and am getting the same results:
http://www.stationplay.com/dev/cache_test.php

Seems like a bug to me.

I'm curious to know what other similar solutions you've looked at.
I saw PEAR has a cache lite as well.

Ophir

David Mintz wrote:

>Hey all.
>
>I've been playing with DB_Cache and encountered a behavior in fetchRow()
>that seems weird -- or I'm doing something stupid, always a leading
>theory.
>
>The version of my Cache package is 1.5.3 and the file (Cache/DB.php)
>containing the class (Cache_DB_Result) containing the method says revision
>1.7 I think it will save words to just show it to you:
>
>http://177coles.dyndns.org/test/
>
>It seems that the internal cursor starts one too high and overruns the end
>of the array. You get a row missing at the beginning and a "undefined
>offest" warning at the end of the loop. I hacked up a crude fix that makes
>the problem ~apparently~ go away and I can show ya that too if anyone's
>interested.
>
>Even more interesting, if you call fetchRow with arguments
>DB_FETCHMODE_XXX and a $rownum, you go into an infinite loop. I didn't try
>to fix that.
>
>It's hard to imagine nobody else noticing these problems, but I found
>nothing either in the PEAR bug reports or by doing some Googling. (Hence
>my alternative theory, that I'm missing something.)
>
>Does anyone know if this is still being maintained, or is it the end of
>the line?
>
>
>---
>David Mintz
>http://davidmintz.org/
>
>        "Anybody else got a problem with Webistics?" -- Sopranos 24:17
>_______________________________________________
>talk mailing list
>talk at lists.nyphp.org
>http://lists.nyphp.org/mailman/listinfo/talk
>  
>




More information about the talk mailing list