Support » Fixing WordPress » Error in streams.php

  • hi there,
    after upgrading to wp 1.2 everything was fine and working.
    but now i recieve a weired multiple error on each of my pages.
    Warning: fread(): Length parameter must be greater than 0. in /homepages/my/path/to/my/blog/wp-includes/streams.php
    does anyone in here have an idea of how to get rid of this?
    thank you in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Okay, fellas i solved my little problem! *heureka*
    the warning was caused by a problem with the localisation files in the wp-admin/includes folder. i deleted them and everything is working fine again. not in german but it works… however. thanks!

    So what was the problem? I get the same problem now, in a new blog I put up. But I need the localisations file. Did anything change in format of localization files or what?

    I found a dirty hack when looking into code of streams.php. Find the function ‘read’ under the cless ‘FileReader’. Add following code
    ‘ if ($bytes==0) return $data=””;’
    I found that it just work. I can not remove localize file cause my audience is Vietnamese (
    ‘ function read($bytes) {
    > if ($bytes==0) return $data=””;
    fseek($this->_fd, $this->_pos);
    $data = fread($this->_fd, $bytes);
    $this->_pos = ftell($this->_fd);
    return $data;

    Thanks Anon! Same problem here. The weird thing is, it also prevented me from logging in (I just got a screenful of error msgs) and messed up the styling of the calendar.
    Last thing I changed was to install the style switcher, but undoing that didn’t help. Removing the L10N file was unlikely to help, because I had not changed it for a long time.
    So I tried your hack and it fixed all 3 issues in one go.
    Something to incorporate into 1.3, perhaps?


    My case is kinda similar , I have to install a fresh new installation of wordpress-1.2 in my hosting.
    If I don’t use any *.po file the setup is perfect.
    If I use a localization file (I tried with Spanish and Italian) I am getting the following error
    Fatal error: Maximum execution time of 30 seconds exceeded in C:\Domains\\wwwroot\rochi\wp-includes\streams.php on line 108
    the line changes sometimes is 107, 108 or even 109
    I tried to add the if ($bytes==0) return $data=””; line in streans.php but no luck, same problem.
    Does anyone found a fix or workaround about this?
    Thanks in advance

    I had the same problem and I figured out it had something to do with the language file. Mine is “” and is located in “wp-includes/languages/”.
    The comment in wp-config.php states, that one should enter
    define ('WPLANG', 'de'); to use “”. This got me the function.fread error.
    Unfortunatley this input seems to depend on the apache server config. For example I need to write
    define ('WPLANG', 'de_DE); to overcome the problem altough my language file is just “”.
    The phpinfo(); should state which string to use (under apache environment) but I couldn’t find it.
    So you’ll have to play around a a bit …

    Just noticed, that my language file isn’t working at all. Anyway it must have something to do with it as my WordPress installation is working fine now – in english ;-).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error in streams.php’ is closed to new replies.