Guest Posted June 25, 2006 Posted June 25, 2006 I finished installing osCommerce and I all has gone very well until now. :D I have managed to solve many of the installation problems, but now after creating the cache and cache files I am getting this error message at the top of the page when I click on any category and then go back to the catalog page: Warning: fread(): Length parameter must be greater than 0. in /home/**/public_html/siteonejewelry/catalog/includes/functions/cache.php on line 60 Here are the contents of line 59, 60 and 61 of the cache.php file from the includes/functions/ directory: // read in serialized data $szdata = fread($fp, filesize($filename)); fclose($fp); Things I have done to try and solve it: -I have searched the forum for a shortened version of the error message. -I have deleted the cache and files and re-created it via FTP -I have reset and recreated the files in cache control in the admin panel -I have chmod cache to 777 -I have chmod files to 777 -I have chmod files to default 644 -I have decreased by one directory the absolute path to the cache, then increased by one hoping error was in path. -I have removed and replaced the trailing slash on path statment. -I have double checked that cache files files were ftp'd in ascii Everything in the control panel of my store appears O.K. Use the cache equals true The path to the cache appears O.K. The 3 cache files appear in cache control as well If anyone can I help, it would be greatly appreciated. Thanks :)
♥Vger Posted June 25, 2006 Posted June 25, 2006 This will explain a little about the use of fopen http://www.opengroup.org/pubs/online/7908799/xsh/fopen.html Vger
Guest Posted June 26, 2006 Posted June 26, 2006 This will explain a little about the use of fopen http://www.opengroup.org/pubs/online/7908799/xsh/fopen.html Vger Hello, Thanks for the info. I did read it along with several other pages that were linked to it. The problem is I do not have enough experience with this to be able to relate the information I am viewing to the problem I am having. If you could clue me in as to what I am supposed to change I would appreciate it. Thanks again.
Guest Posted June 27, 2006 Posted June 27, 2006 Hello, I have continued to try and solve the cache error message but I really have no idea how. I do know that when I disable the cache function from the admin panel the message goes away. Can anyone please give me a hint as to what I should do to fix this. Your guess is as good as mine so all suggestions are welcome. Here is the original error message: Warning: fread(): Length parameter must be greater than 0. in /home/**/public_html/siteonejewelry/catalog/includes/functions/cache.php on line 60 Here are the contents of line 59, 60 and 61 of the cache.php file from the includes/functions/ directory: // read in serialized data $szdata = fread($fp, filesize($filename)); fclose($fp); Thanks again for any help.
OceanRanch Posted June 27, 2006 Posted June 27, 2006 Try setting cache to true in admin and set the cache directory to blank/null. This should allow the creation of the cache files to be in your "catalog" folder. HTH Tom
Guest Posted June 28, 2006 Posted June 28, 2006 Try setting cache to true in admin and set the cache directory to blank/null. This should allow the creation of the cache files to be in your "catalog" folder. HTH Tom Hello Tom, Thank you very much for the help. When I leave the field for the path to the cache blank I get this error message in cache control: Cache directory does not exist. Please set this Configuration->Cache. There is of course the great possibility that I am not interpreting your suggestion correctly. If what I did is not what you had in mind, please feel free to correct me. Thanks again for the help. :)
OceanRanch Posted June 28, 2006 Posted June 28, 2006 Sounds like you either have a problem with your configure.php settings or a permissions problem. You might want to change the error message you are receiving to display the value of the Cache directory that it can't find. Tom
OceanRanch Posted June 28, 2006 Posted June 28, 2006 Try setting the cache directory via admin to /home/**/public_html/siteonejewelry/catalog/ Fill in the ** with your local info. Tom
Guest Posted June 29, 2006 Posted June 29, 2006 Try setting the cache directory via admin to /home/**/public_html/siteonejewelry/catalog/ Fill in the ** with your local info. Tom Hello, Thanks for the help. Sorry it took so long to reply but other work tends to pile up. I am going to try your suggestions today. Thanks again. By the way, Happy third "osCommerce Community Support Forums" aniversary! I see you have been at this for three years as of yesterday. :thumbsup:
Antonimo Posted August 3, 2006 Posted August 3, 2006 I hope my experience will help... I had a near perfect installation today, however I set up the cache as per the instructions in the "documentation.pdf" Through an FTP program, create a subfolder named "cache" in the "catalog" folder andset the chmod permissions to 777. Then go to Configuration/Cache. Click on "Use Cache" and set to "true". Click on Cache Directory and set the absolute directory path to the "cache" folder. I further created three empty files: ...upload via FTP, three blank files into yourcache directory called: categories_box-english.cache manufacturers_box-english.cache also_purchased-english.cache Then, I received the error, Warning: fread(): Length parameter must be greater than 0. in/home/**/**/**/catalog/includes/functions/cache.php on line 60 As soon as I deleted the three empty files, the error disappeared and the files were created automatically in the cache folder.
Antonimo Posted August 3, 2006 Posted August 3, 2006 small problem with my internet connection - apologies :blush:
♥valerif Posted August 9, 2006 Posted August 9, 2006 I hope my experience will help... I had a near perfect installation today, however I set up the cache as per the instructions in the "documentation.pdf" I further created three empty files: Then, I received the error, As soon as I deleted the three empty files, the error disappeared and the files were created automatically in the cache folder. i have now the same problem i added some text to the files so that they are not 0k bu 1k of size and it worked hope this helps categories_box-english.cache manufacturers_box-english.cache also_purchased-english.cache cheers
Hoheria Posted November 17, 2007 Posted November 17, 2007 I too got this warning message when testing the store: Warning: fread(): Length parameter must be greater than 0. in /home/**/public_html/localstuff/catalog/includes/functions/cache.php on line 60 I set up the cache and manually created and uploaded these empty files - as suggested in the OSC manual if they do not exist: categories_box-english.cache manufacturers_box-english.cache also_purchased-english.cache But, as suggested above, if you delete these files they will be created as needed, automatically, by the store. You can delete easily from admin/tools/cachecontrol and click on the action button. Sorted and thanks.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.