If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Warning: fread(): Length parameter must be greater than 0  XML
Forum Index » Support Forum
Author Message
Anonymous



Hi,

Since tonight I have a php error message, but I don't know what it means:
Warning: fread(): Length parameter must be greater than 0.
in /home/public_html/gastenboek/lib/template.class.php on line 45

Does anybody know what it means and how to fix it?

Tnx a lot!

Bas
Anonymous



Same problem here, since July 14.

Warning: fread(): Length parameter must be greater than 0. in /home/pwhs/public_html/forms/guestbook/lib/template.class.php on line 53

Warning: fread(): Length parameter must be greater than 0. in /home/pwhs/public_html/forms/guestbook/lib/template.class.php on line 53

Carlos
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4290
Location: Bristol, UK
Offline

Bas which version of the Guestbook are you using?

Carlos I think your problem may lie within one of your template files located iin Templates/

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



Same problem here...maybe this is a 15th of July-bug...

Warning: fread(): Length parameter must be greater than 0. in /home/*******/public_html/gastenboek/lib/template.class.php on line 53

I'm using the 2.3.1-version

Could anyone help pls? thank you!
Anonymous



Carbonize:

I already downloaded the latest guestbook yesterday and replaced all the files in the template. NO effect.

I need to fix this asap.

Any other possible help?

Carlos
Anonymous



Hello,

Anyone to help us here?

Carlos
Anonymous



I've got the same prob. help!!!
Anonymous



anyone, PLEASE.... If neccesary, I'll beg on my knees...
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4290
Location: Bristol, UK
Offline

Are you getting this error message at the start of the page or halfway down? I assume you are getting it on the index page.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4290
Location: Bristol, UK
Offline

Can't see why it suddenly started on July 14th unless your host changed their PHP version on that date. fread(filename, amounttoread) is the problem. In the code he uses

which means read the file named in the variable $fd for x amount of characters. He uses filesize($filename) to indicate he wants the whole of the template file to be read. For some reason the script is being told that th size of $filename is 0.

As an experiment open up lib/template.class.php and find

and between the two lines add
Hopefully this should stop the script at this point and tell the browser to display the path name of the template it is looking for. I hope anyway.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



Hi Carbonize...

The error appears on top of the page. I did the things you asked, and this is what came up:

/home/****/public_html/gastenboek/templates/entry.php

thanks in advance for your efforts!
vickster
Beginner

Joined: 19/07/2004 13:20:46
Messages: 11
Offline

and this is what entry.php contains:

<tr bgcolor="$bgcolor">
<td width="32%" valign="top">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="font2" valign="top" width="8%"><b>$id)</b></td>
<td colspan="2" class="font1"><b>$row[name]</b>&nbsp;$GENDER</td>
</tr>
<tr>
<td colspan="2" class="font1">$row[email]</td>
</tr>
<tr>
<td colspan="2" class="font2">$LANG[FormLoc]:<br>$row[location]</td>
</tr>
</table>
</td>
<td width="68%" class="font1" valign="top">
<div align="left" class="font3"><img src="$GB_PG[base_url]/img/post.gif" width="9" height="9">$DATE&nbsp;$HOST
<a href="$GB_COMMENT"><img src="$GB_PG[base_url]/img/edit.gif" width="18" height="13" border="0" alt="$LANG[AltCom]"></a>
$EMAIL
</div>
<hr size="1"><div align="left">
$USER_PIC $MESSAGE
</div>
$COMMENT
</td>
</tr>


I don't know if this is usefull, but hey, you never know...
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4290
Location: Bristol, UK
Offline

And is entry.php located at /home/****/public_html/gastenboek/templates/entry.php ?

Can't see the problem lying in the permissions but can you check the permissions on entry.php (chmod).

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
vickster
Beginner

Joined: 19/07/2004 13:20:46
Messages: 11
Offline

entry.php is indeed located on this location.

permissions are 777
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4290
Location: Bristol, UK
Offline

Well if the path name is correct and the file is not empty why is it returning a 0 I'll look into reasons why filesize may report wrong sizes.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum