Author |
Message |
15/07/2004 00:52:06
|
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
|
|
15/07/2004 16:04:26
|
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
|
|
15/07/2004 16:38:01
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
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 |
|
15/07/2004 19:27:41
|
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!
|
|
16/07/2004 04:17:43
|
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
|
|
16/07/2004 15:02:44
|
Anonymous
|
Hello,
Anyone to help us here?
Carlos
|
|
17/07/2004 11:33:01
|
Anonymous
|
I've got the same prob. help!!!
|
|
18/07/2004 19:56:49
|
Anonymous
|
anyone, PLEASE.... If neccesary, I'll beg on my knees...
|
|
18/07/2004 22:05:44
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
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 |
|
18/07/2004 22:14:13
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
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 |
|
19/07/2004 13:18:58
|
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!
|
|
19/07/2004 13:22:57
|
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> $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 $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...
|
|
19/07/2004 13:49:02
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
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 |
|
19/07/2004 13:53:31
|
vickster
Beginner
Joined: 19/07/2004 13:20:46
Messages: 11
Offline
|
entry.php is indeed located on this location.
permissions are 777
|
|
19/07/2004 16:04:33
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
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 |
|
|