Issues

ZF-2593: When using file backend for cache, the files will never be locked.

Issue Type: Bug Created: 2008-02-06T17:36:27.000+0000 Last Updated: 2008-03-21T16:25:40.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Moshe (moshe) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: Attachments:

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts