PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Caching » Cache_Lite » Bug #5414

Corrupt cache file creation

Details

Submitted2005-09-15 15:01 UTC
Fromfinwe at finwe dot info
StatusBogus
PackageCache_Lite
PHP Version5.0.3
OSFedora Core 3
Roadmaps(Not assigned)

Comments

[2005-09-15 15:01 UTC] finwe at finwe dot info

Description:
------------
I have a problem

- On the first run of the script, correct cache file is generated (10 kB).
- On the second run, the correct file is loaded, but then rewritten by a corrupt file containing something like " 0".
- On the third page reload, corrupt file is loaded and therefore blank page is displayed.

Test script:
---------------
...
$options = array(
'caching' => true,
'cacheDir' => 'cache/',
'lifeTime' => 84000,
'automaticSerialization' => true
);

$cache = new Cache_Lite_Output($options);
$cache->setToDebug();
$param = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
if (!($cache->start($param))){
...

Expected result:
----------------
Not to create corrupt file.

Actual result:
--------------
Creating corrupted file and displaying blank page.

[2005-09-19 21:38 UTC] fab at php dot net

Which version of Cache_Lite do you use ? And may I have the complete test script ? Thanks

[2005-09-20 11:23 UTC] finwe at finwe dot info

Sorry for a false warning, but I rewrited code back to Cache_Lite_Output (i used Cache_Lite with ob) and it seems to work correctly. The error could be
The version is 1.5.2...

[2005-09-20 16:11 UTC] fab at php dot net

ok not a problem :)