Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.8.3

Bug #8361 Cache_lite bug with MBSTRING
Submitted: 2006-08-04 13:37 UTC
From: vincent dot dupont at ausy dot be Assigned: fab
Status: No Feedback Package: Cache_Lite
PHP Version: 4.3.11 OS: win XP
Roadmaps: (Not assigned)    
Subscription  


 [2006-08-04 13:37 UTC] vincent dot dupont at ausy dot be (Vincent dupont)
Description: ------------ Hi, Cache_Lite will not work correctly when MBSTRING is activated . The error seem random; but I think it occurs on the validation codes generated by cache_lite. The source of the bug seem to be mbsting extension because it stopped to bug when i removed this extension. This is normal as far as mbstring will (could) change the content of the files writtent by cache_lite. Actual result: -------------- the save() and get() function return false. on the Save(), The error is generated dureing the integrity check _writeAndControl()

Comments

 [2006-09-13 06:33 UTC] jon (Jon Parise)
Reassigning to the Cache_Lite package.
 [2006-09-14 17:36 UTC] fab at php dot net (Fabien MARTY)
I will try to investigate
 [2006-11-07 13:14 UTC] a dot vi at laposte dot net (Axel)
Hi, same problem when I activate "mbstring.func_overload = 7" in the PHP.ini. My server runs with Linux Ubuntu. I can save properly the cache but I can't read it again. Is there any hotfix? Regards Axel
 [2006-11-07 13:47 UTC] a dot vi at laposte dot net (Axel)
Following my previous post. I patched the code to make it work with mbstring. This code extract comes from the _write function: $fp = @fopen($this->_file, "wb"); if ($fp) { /* PATCH BY AQUEL */ $mqr = get_magic_quotes_runtime(); # We save the magic quotes status set_magic_quotes_runtime(0); # We disable the magic quotes /* END PATCH */ if ($this->_fileLocking) @flock($fp, LOCK_EX); if ($this->_readControl) { @fwrite($fp, $this->_hash($data, $this->_readControlType), 32); } /* PATCH BY AXEL */ /* $len = strlen($data); */ /* @fwrite($fp, $data, $len); */ @fwrite($fp, $data); set_magic_quotes_runtime($mqr); # We set the magic quotes status back to default /* END PATCH */ if ($this->_fileLocking) @flock($fp, LOCK_UN); @fclose($fp); return true; } It seems to be working now. Regards
 [2007-01-08 21:46 UTC] fab at php dot net (Fabien MARTY)
I just commited the proposed patch (thanks) to CVS, it's ok for you now ?