ZF-2593: When using file backend for cache, the files will never be locked.
Description
Revision: 7826 Class: Zend_Cache_Backend_File Methods: _fileGetContents, _filePutContents Lines: 660, 668, 681, 683
In both methods flock() function is given parameters $f and $fp (??) that are nowhere declared, my guess they should be $file.
error-suppresion operator @ is successfully used to hide this error.
Comments
Posted by Fabien MARTY (fab) on 2008-02-07T12:43:08.000+0000
stupid error when refactoring the file backend, many thanks for the report, fixed in SVN trunk
Posted by Moshe (moshe) on 2008-02-07T13:38:03.000+0000
Here's what i get now:
Debug Warning: \home...\lib\Zend\Cache\Backend\File.php line 660 - flock() expects parameter 1 to be resource, string given Debug Warning: \home...\lib\Zend\Cache\Backend\File.php line 668 - flock() expects parameter 1 to be resource, string given Debug Warning: \home...\lib\Zend\Cache\Backend\File.php line 681 - flock() expects parameter 1 to be resource, string given Debug Warning: \home...\lib\Zend\Cache\Backend\File.php line 683 - flock() expects parameter 1 to be resource, string given
I guess you'll have to fopen it
Posted by Moshe (moshe) on 2008-02-07T14:47:13.000+0000
Also, maybe when testing, remove @ to see errors :)
Posted by Fabien MARTY (fab) on 2008-02-10T08:11:31.000+0000
oooops...
thanks, I hope it's fixed in SVN trunk now
Posted by Moshe (moshe) on 2008-02-14T16:44:32.000+0000
Somehow cache file with size 0 was created, and when it was attempted to be read by _fileGetContents it gave an error in $result = fread($f, $fsize); - apparently fread can't have $fsize==0
Posted by Fabien MARTY (fab) on 2008-02-15T10:22:16.000+0000
fixed in SVN trunk, thanks Moshe