Home
LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
[done] Problem accessing the admin (fread error) (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: [done] Problem accessing the admin (fread error)
#7579
Niklas (User)
Fresh Lemon
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
[done] Problem accessing the admin (fread error) 1 Year ago Karma: 0  
Hello,
After not using limesurvey for some time I wanted to access the admin-area agein. But after I logged in the following Message appeared (about a thousand times):
Code:


Warning: fread() [function.fread]: Length parameter must be greater than 0 in streams.php on line 112



I looked into that file and was really suprised to find this:
[code:1]
while ($bytes > 0) {
$chunk = fread($this->_fd, $bytes); // this is line 112
@$data .= $chunk;
$bytes -= strlen($chunk);
}
[/code:1]

It looks like the parameter $bytes can't be 0. So why is it, and why does the warning appear???

I hope someone can help me...

-- Niklas
 
Logged Logged  
 
Last Edit: 2008/03/25 02:08 By Mazi.
  The administrator has disabled public write access.
#7580
jcleeland (Admin)
Moderator Lime
Posts: 243
graphgraph
User Offline Click here to see the profile of this user
Re:Problem accessing the admin (fread error) 1 Year ago Karma: 7  
Hi Niklas,

It's probably an error with get-text, which is not part of the LimeSurvey core code.

I found this on the net:

-----------------
Wordpress: fix for broken localization in PHP 5
author - malyfred / 10. 10. 2004 /

*
esky

I have found solution how to fix this warning:

Warning: fread() [function.fread]: Length parameter must be greater than 0. in your_domain/wp-includes/streams.php on line 107

You have to fix gettext.php! Try the proper version according to your PHP version:

//$MAGIC1 = (int)0x950412de; //bug in PHP 5
//$MAGIC1 = (int) - 1794895138; //bug in PHP 4.4.0
$MAGIC1 = 2500072158;

//$MAGIC2 = (int)0xde120495; //bug in PHP 5
//$MAGIC2 = (int) - 569244523;// bug in PHP 4.4.0
$MAGIC2 = 3725722773;
---------------------

Have a look in the file "streams.php"

Hope this is of some help.

Jason
 
Logged Logged  
  The administrator has disabled public write access.
#11213
oliverchan (User)
Fresh Lemon
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:Problem accessing the admin (fread error) 8 Months, 2 Weeks ago Karma: 0  
I have the same issue here.

The error appeared in both 1.53 and 1.70. The log file grow by million lines in a few minutes. I tried the suggestion above, but seems that the it just prevents writing into the log file. I cannot enter LS login page until httpd is restarted.

I wonder if there is a real solution to this issue? I am running CentOS 5.1 with PHP5.1.6.
 
Logged Logged  
 
Last Edit: 2008/03/21 18:40 By oliverchan.
  The administrator has disabled public write access.
#11214
c_schmitz (Admin)
Moderator Lime
Posts: 1365
graphgraph
User Online Now Click here to see the profile of this user
Re:Problem accessing the admin (fread error) 8 Months, 2 Weeks ago Karma: 39  
Hi!
The real solution is to update your PHP version as it is a bug in PHP.
 
Logged Logged  
 
Best regards

Carsten Schmitz
LimeSurvey Project Leader
  The administrator has disabled public write access.
Go to top