X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   i swear i did nothing officer. :-) (https://forum.x-cart.com/showthread.php?t=13156)

theway 04-01-2005 04:32 PM

i swear i did nothing officer. :-)
 
all i have done is uploaded an image

and also replaced xlogo_logo image to a different image (i thought this would be the easiest way to change the image on the front page).

and when i went to my web site at the top of my web site comes up with
"Warning: fread(): Length parameter must be greater than 0. in /www/clientweb/au/t/theway.net.au/shop/include/func.php on line 4740"

all i have done with the web site is the above, i have looked at the skins and other pages but not changed anything yet.

what does this mean (apart from me being dumb. :oops: )

theway 04-01-2005 04:34 PM

sorry i forgot about my sig info

Jon 04-01-2005 04:36 PM

Probably means one of your .tpl files is empty. They can't be empty, if you put {* null *} in them instead it will fix the prob.

theway 04-01-2005 04:40 PM

sorry i l did do somehthing else.

i did delete one of my files. it was the one which show the xcart in the bottom left of the screen. so i have to find that and put {*null*} there.

thanks
i have been going through my web site and the forums for about 3 hours trying to do this thing.

its all new to me.

theway 04-01-2005 05:21 PM

thank you for that.

this problem is now solved.


just like to say, that these forums have been very helpfull to me, and i dont know if i would have done anything without them.

so thanks to all these smart people, who reply to all the simple questions. :D

Jon 04-01-2005 09:43 PM

Glad I could help.

You may find out ezine of help also:
http://www.websitecm.com/store/customer/mailinglist.php

auggybendoggy 04-02-2005 05:36 AM

theway,
can you tell us how you found the empty tpl

or which one it was cause i get the same prob and I don't know how to track it down except to view them in smarty

Jon 04-02-2005 12:11 PM

^ Log onto your FTP and view your template files, you'll be able to see 0 bytes as a file size for any empty ones.

auggybendoggy 04-04-2005 03:52 AM

jon,
I did that and I did find a line near the end of my file that read fread () bla bla bla <0 which I noticed was less than zero.

how would I know what to change the value to if that is the one.

auggy

Jon 04-04-2005 11:09 AM

Just put: {* Anything Here *}

That just puts in a commented out line.

auggybendoggy 04-04-2005 02:51 PM

ill give it a try

auggybendoggy 04-04-2005 03:01 PM

i dont know what to put?

heres what it says

#
# fopen + fread wrapper
#
function func_file_get($file, $is_root = false) {
$fp = func_fopen($file, 'rb', $is_root);

if ($fp === false) return false;

while (strlen($str = fread($fp, 8192)) > 0 )
$data .= $str;

fclose($fp);
return $data;
}

#
# readfile() wrapper
#
function func_readfile($file, $is_root = false) {
$file = func_allow_file($file, $is_root);
if ($file === false) return false;
return readfile($file);
}

#
# Get tmpfile content
#
function func_temp_read($tmpfile, $delete = false) {
if (empty($tmpfile))
return false;

$fp = @fopen($tmpfile,"rb");
if(!$fp)
return false;

while (strlen($str = fread($fp, 4096)) > 0 )
$data .= $str;
fclose($fp);

if ($delete) {
@unlink($tmpfile);
}

return $data;
}

Jon 04-04-2005 07:45 PM

That looks like a PHP file not a template file.

theway 05-13-2005 07:49 PM

i just spent an hour going through all my folders, till i found the one i had to fix.
so i dont really have a simpile solution.

shan 05-14-2005 02:12 AM

or use the debug window to show you the templates being used in the page with the error


All times are GMT -8. The time now is 10:27 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.