In this article, I will show you solutions for two errors reported in TomatoCart community and how you can resolve them.
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
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:
- The directory doesn’t have the proper read permissions and so is forbidden by the web server
- 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.
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.
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:
- Remove the following code snippet from admin/includes/application_top.php
- 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.