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

try changing
to

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

Are you hosted on a windows server by any chance?

Carbonize
I am not the maker of the Advanced Guestbook

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



I changed my the code;
$this->template[$tpl] = fread ($fd, filesize ($filename))

to...
$this->template[$tpl] = fread ($fd, 10000);

And then the message dissapeard... don't know if 10000 is for ~10 Mb ...but... maybe someone with a little more PHP knowledge can tell me?!

/D
Carbonize
Master
[Avatar]

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

The size is in bytes so that would be about 10kb

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 is says:

/home/****/public_html/gastenboek/templates/entry.php size = 894

I'm curious what will happen next...

thanks in advance for your help Carbo...This is one of the first boards where help actually comes when needed!

More info on the server and phpversion:

PHP Version 4.3.8

System Linux ****.*****.com 2.4.20-28.7 #1 Thu Dec 18 11:31:59 EST 2003 i686
Build Date Jul 15 2004 17:32:12
Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-magic-quotes' '--with-mysql' '--enable-discard-path' '--with-pear' '--enable-safe-mode' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, compress.zlib
Carbonize
Master
[Avatar]

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

Ok well thats one idea out of the window. If it's returning the right file size I don't see the problem try removing the stuff I asked you to put in and then
remove the whitespace in the code.

to

Shouldn't make a difference but you never know.

or just remove

and replace
with

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

Carbonize...you won't like this, but I get the same message again:

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

Could it have something to do with other chmod-permissions on files, who are not accessible, so eg. size is not readable by the script...just thinking...
Carbonize
Master
[Avatar]

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

The size is readable as it returned in our earlier experiment.

Which change did you try?

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

none, checked manual again, and permissions were set right...
Carbonize
Master
[Avatar]

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

I mean which of the changes I mentioned in my previous post. Did you try removing the whitespace from ? or did you leave in

and replace filesize ($filename) with $thesize ?

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

ooops, sorry, I tried them both, together
Carbonize
Master
[Avatar]

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

ok well try either or and see if they work

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

Hey carbo...

So I tried the first (whitespace) sollution, then the change of fread-line, and as you already know, I tried both of 'em together....nothing changes...
Carbonize
Master
[Avatar]

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

OK this is weird because it's providing the right size when we used This is why I suggested trying but you're telling me this doesn't work Ask your hosts if they made any changes on the date when it stopped working as thats the only reason I can think of for it to stop working.

ps. I know there is more to the fread line than just fread I'm just paraphrasing.

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

carbo, I added you on my msn contactlist, that way I can send you the file, just to doublecheck....
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum