[TomatoCart 1.x] Solutions for two errors

In this article, I will show you solutions for two errors reported in TomatoCart community and how you can resolve them.

[Error 1]:

I get a warning message on my hompage.

It reads as Warning: fread() [function.fread]: Length parameter must be greater than 0 in/home/u292171877/public_html/includes/classes/cache.php on line 63

[Solution 1]:

This error is caused by TomatoCart not being able to find the required cached files in the includes/work directory. There are 2 things that can cause this:

  1. The directory doesn’t have the proper read permissions and so is forbidden by the web server
  2. There was an issue causing the cache file to get lost during its generation.

To resolve this, set the includes/work directory to 0777. Now, try to clear all of the cache files within the directory enabling TomatoCart to automatically regenerate these files.

[Error 2]:

I have downloaded and installed TomatoCart on localhost as per the instructions given in the documentation (user guide and wiki) found on the site. No problems were reported/encountered. However, when testing the installation from XAMPP and via FireFox/Google Chrome the “localhost/tomato_cart/admin/” page returned a “This webpage has a redirect loop” error. Consequently I cannot proceed to configure the site for my own use.

[Solution 2]:

In most cases, this is caused when the wrong cookie domain name has been set in your includes/configure.php file. It should match: $_SERVER[‘HTTP_HOST’] – If it does not, the system will be redirected. There are 2 fixes for this:

  1. Remove the following code snippet from admin/includes/application_top.php
  2. Find the $_SERVER[‘HTTP_HOST’] in your TomatoCart install and change the HTTP_COOKIE_DOMAIN to match this.

And that is it. Your issues should now be resolved but if not, feel free to comment below.

Looking for quality TomatoCart hosting? Check out Arvixe Web Solutions

Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

One Comment on [TomatoCart 1.x] Solutions for two errors

  1. Dartco says:

    Jack, you can add the button to forcibly delete all cache files in work directory. That’s better to add this feature than explain to users how to delete files by ftp or through site control panel.

    And what’s the problem to add a module for admin panel to constantly monitor critical script problems (like directories permissions etc) and show them on desktop in admin panel? I think that there will be much less complaints

Leave a Reply

Your email address will not be published. Required fields are marked *