Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error When I set "Use Cache" to "True" in Admin


ace21187

Recommended Posts

Hey guys,

When I set “use cache” to "true" in the admin section of my store. I receive the following error when I visit my home page.

 

 

 

Warning: fread() [function.fread]: Length parameter must be greater than 0. in /home/classie9/public_html/catalog/includes/functions/cache.php on line 60

 

Warning: fread() [function.fread]: Length parameter must be greater than 0. in /home/classie9/public_html/catalog/includes/functions/cache.php on line 60

 

 

 

I followed all the instructions in the OsCommerce Documentation to set up cache and my files show up under Admin>>Tools>>Cache Control.

 

 

My cache directory is located at /catalog/cache

 

Anyone have any ideas why I am receiving the error?

 

 

Thanks,

 

Dan

Link to comment
Share on other sites

  • 4 weeks later...
I'm really stuck guys.... :(

 

Dan

Open the .cache files and put a couple spaces, save and reupload.

 

That stopped that error for me, but then my Cat & Mfg boxes disappeared and the cache files are not being written.

Brian Christensen

Link to comment
Share on other sites

  • 5 months later...
  • 5 weeks later...

Found this fix after doing another search on the forums.

 

It works well so a BIG thanks to ANTOMINO.

 

Posted by: Antonimo Aug 4 2006, 06:42 AM

 

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"

QUOTE

Through an FTP program, create a subfolder named "cache" in the "catalog" folder and

set 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:

QUOTE

...upload via FTP, three blank files into your

cache directory called:

categories_box-english.cache

manufacturers_box-english.cache

also_purchased-english.cache

 

Then, I received the error,

QUOTE

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...