Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems setting up cache


just2red

Recommended Posts

I've gone through the steps outlined in the documentation to set up the cache on my site. I am no longer getting a message that I do not HAVE a cache, however now when I view the catalog live instead of the manufactures box and the what's new box I get the following message:

 

Warning: fread() [function.fread]: Length parameter must be greater than 0. in /home/hsphere/local/home/usadog/usadogshop.com/catalog/includes/functions/cache.php on line 60

 

Here are lines 57 thru 69 of the cache.php file as it is now:

 

// try to open file

if ($fp = @fopen($filename, 'r')) {

// read in serialized data

$szdata = fread($fp, filesize($filename));

fclose($fp);

// unserialze the data

$var = unserialize($szdata);

 

$success = true;

}

 

return $success;

}

 

Any suggestions what is wrong?

 

Thanks!!

Red

As we express our gratitude, we must never forget that the highest appreciation is not to utter words, but to live by them. - J.F. Kennedy

Link to comment
Share on other sites

  • 2 weeks later...

I am getting the same error message. So if anyone has any ideas how to resolve this that would make 2 happy bunnies.

 

I've gone through the steps outlined in the documentation to set up the cache on my site. I am no longer getting a message that I do not HAVE a cache, however now when I view the catalog live instead of the manufactures box and the what's new box I get the following message:

 

Warning: fread() [function.fread]: Length parameter must be greater than 0. in /home/hsphere/local/home/usadog/usadogshop.com/catalog/includes/functions/cache.php on line 60

 

Here are lines 57 thru 69 of the cache.php file as it is now:

 

// try to open file

if ($fp = @fopen($filename, 'r')) {

// read in serialized data

$szdata = fread($fp, filesize($filename));

fclose($fp);

// unserialze the data

$var = unserialize($szdata);

 

$success = true;

}

 

return $success;

}

 

Any suggestions what is wrong?

 

Thanks!!

Red

Link to comment
Share on other sites

  • 2 weeks later...

This issue is now fixed! Thanks so much for the help.

- Red

As we express our gratitude, we must never forget that the highest appreciation is not to utter words, but to live by them. - J.F. Kennedy

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...