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
Carbonize
Master
[Avatar]

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

Well I may be offline for a day or two. I was doing a disc clean up last night and windows decided to go and start deleting every file on the C drive had to reinstall windows which is no fun at 22:30. I will reinstall Trillian or Gaim either today or tomorrow. Feel free to email the templates.class.php file to me in the meantime.

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: 4292
Location: Bristol, UK
Offline

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

change it to

This should make a text file showing what templates are called and the size that is being returned.

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

this is what comes up:

Warning: fopen(errortest.txt): failed to open stream: Permission denied in /home/brasseur/public_html/gastenboek/lib/template.class.php on line 51

Warning: fwrite(): supplied argument is not a valid stream resource in /home/brasseur/public_html/gastenboek/lib/template.class.php on line 53

Warning: fclose(): supplied argument is not a valid stream resource in /home/brasseur/public_html/gastenboek/lib/template.class.php on line 54

(this message keeps repeating itself)
I did a chmod 777, just to be sure, but nothing changed...
Carbonize
Master
[Avatar]

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

grrrr it should automatically have made a file called errortest.txt oh well make a file called errortest.txt and upload it into the same directory as addentry.php and chmod the file to 777. Change the code to This way it will look fr the file in the gastenboek directory.

I probably should of used the full path in the first place.

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

result:

Parse error: parse error, unexpected T_STRING in /home/*****/public_html/gastenboek/lib/template.class.php on line 58


if (file_exists("$filename")) {
$fd = fopen ($filename, "r");
$this->template[$tpl] = fread ($fd, filesize ($filename))
LINE 58: fclose ($fd);
$this->template[$tpl] = ereg_replace("\"", "\\\"", $this->template[$tpl]);
Carbonize
Master
[Avatar]

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

You're missing the ; from the end of
Should be

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

oops...ok, this is what's in the txt-file:

Filename = /home/brasseur/public_html/gastenboek/templates/entry.php Filesize = 894
Filename = /home/brasseur/public_html/gastenboek/templates/com.php Filesize = 224
Filename = /home/brasseur/public_html/gastenboek/templates/url.php Filesize = 143
Filename = /home/brasseur/public_html/gastenboek/templates/icq.php Filesize = 169
Filename = /home/brasseur/public_html/gastenboek/templates/aim.php Filesize = 158
Filename = /home/brasseur/public_html/gastenboek/templates/email.php Filesize = 131
Filename = /home/brasseur/public_html/gastenboek/templates/user_pic.php Filesize = 180
Filename = /home/brasseur/public_html/gastenboek/templates/header.php Filesize = 1888
Filename = /home/brasseur/public_html/gastenboek/templates/body.php Filesize = 2196
Filename = /home/brasseur/public_html/gastenboek/templates/footer.php Filesize = 0
Filename = /home/brasseur/public_html/gastenboek/templates/entry.php Filesize = 894
Filename = /home/brasseur/public_html/gastenboek/templates/com.php Filesize = 224
Filename = /home/brasseur/public_html/gastenboek/templates/url.php Filesize = 143
Filename = /home/brasseur/public_html/gastenboek/templates/icq.php Filesize = 169
Filename = /home/brasseur/public_html/gastenboek/templates/aim.php Filesize = 158
Filename = /home/brasseur/public_html/gastenboek/templates/email.php Filesize = 131
Filename = /home/brasseur/public_html/gastenboek/templates/user_pic.php Filesize = 180
Filename = /home/brasseur/public_html/gastenboek/templates/header.php Filesize = 1888
Filename = /home/brasseur/public_html/gastenboek/templates/body.php Filesize = 2196
Filename = /home/brasseur/public_html/gastenboek/templates/footer.php Filesize = 0
Filename = /home/brasseur/public_html/gastenboek/templates/entry.php Filesize = 894
Filename = /home/brasseur/public_html/gastenboek/templates/com.php Filesize = 224
Filename = /home/brasseur/public_html/gastenboek/templates/url.php Filesize = 143
Filename = /home/brasseur/public_html/gastenboek/templates/icq.php Filesize = 169
Filename = /home/brasseur/public_html/gastenboek/templates/aim.php Filesize = 158
Filename = /home/brasseur/public_html/gastenboek/templates/email.php Filesize = 131
Filename = /home/brasseur/public_html/gastenboek/templates/user_pic.php Filesize = 180
Filename = /home/brasseur/public_html/gastenboek/templates/header.php Filesize = 1888
Filename = /home/brasseur/public_html/gastenboek/templates/body.php Filesize = 2196
Filename = /home/brasseur/public_html/gastenboek/templates/footer.php Filesize = 0

Only file with size 0 is footer.php...would that be the prob? -ADDED: Well, I checked the original file, and the footer-thing is where it says "powered by...."

ADDED:

Carbonize...I inserted the original text in the footer between comment tags, and now the error message is gone...apparently none of the files may be 0 bytes "large", they should at least have 1 byte or so is my guess...

THANK YOU A 1000 TIMES FOR YOUR EFFORTS, it was great trying out the PHP-wilderness with ya!!!

Maximum respect!
JTD
Graduate

Joined: 08/05/2004 21:52:50
Messages: 529
Location: Arkansas
Offline

Did you mistakenly delete the info in your footer.php file? Here is a copy of footer.php if you need it. Iam assuming its version 2.3.1

<center><b><font face="Arial, Helvetica, sans-serif" color="#CCCCCC" size="1">Powered by <a href="http://www.proxy2.de" target="_blank"><font color="#CCCCCC" size="1">Advanced Guestbook 2.3.1</font></a></font></b></center>
</body>
</html>

LINK-> Use Lazarus Guestbook
[WWW] [Yahoo!] aim icon [MSN]
Carbonize
Master
[Avatar]

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

I think I had this problem when I first deleted the footer. You can simply put a space in the file and it should work fine without adding anything to the site or use &nbsp;.

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