WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Got a Fatal error: Only variables can be passed by reference (12 posts)

  1. Seikilos
    Member
    Posted 8 years ago #

    Hi,
    my Blog suddently exit with the following Error MSG:
    Fatal error: Only variables can be passed by reference in /www/htdocs/.../wp-includes/gettext.php on line 66

    I havent change anything there so i dunno what happened there.
    My PHP Version is still 5 and all i have done is preparing the blog for a plugin -> i created an folder in the plugins folder but it remains empty because i dont want the plugin anymore, i deleted the folder, but the problem persist.
    Im not sure, but i guess that wasnt the problem

  2. Torn
    Member
    Posted 8 years ago #

    Hi, i've got the same problem:
    Fatal error: Only variables can be passed by reference in (...)/wp-includes/gettext.php on line 66

    Server config is: Apache/2.0.54 (Unix) PHP/5.0.5

    Is there a fix to this error?

  3. owdjim
    Member
    Posted 8 years ago #

    Me too :-(

    Apache/1.3.34(Unix) PHP/5.0.5

    I've turned error display off in php.ini, but I don't think that is really the right solution!

    Any suggestions as to the cause of this error?

    Cheers, Chris

  4. peman
    Member
    Posted 8 years ago #

    Happen to me too, i got this:
    Fatal error: Only variables can be passed by reference in /customers/ennova.se/httpd.www/wp/wp-includes/classes.php on line 629

    But sometimes it works and soemtimes it dont, sometimes its only show my headerlogo and nothing more. It happens when i click on the categories.

  5. James
    Happiness Engineer
    Posted 8 years ago #

    Bug Report and possible patch: http://trac.wordpress.org/ticket/1614

  6. peman
    Member
    Posted 8 years ago #

    Thank you very much! That worked great!

  7. sanate
    Member
    Posted 8 years ago #

    I have the same problem in gettext.php on line 66,

    Yes, it runs on PHP 5 - which sees it as expression, not as a variable.
    This seems to fix it in PHP5:

    /**
    * Reads a 32bit Integer from the Stream
    *
    * @access private
    * @return Integer from the Stream
    */
    function readint() {
    if ($this->BYTEORDER == 0) {
    // low endian
    $promenna_v='V';
    $prom_pom = unpack($promenna_v, $this->STREAM->read(4));
    return array_shift($prom_pom);
    } else {
    // big endian
    $promenna_n='N';
    $prom_pom = unpack($promenna_n, $this->STREAM->read(4));
    return array_shift($prom_pom);
    }
    }

  8. Sr-ultimate
    Member
    Posted 8 years ago #

    How can I do this for pages ? Im using <?php wp_list_pages(''); ?>

    Plz help .

  9. Slope
    Member
    Posted 8 years ago #

    I've found easy solution -

    just edit includes/gettext.php
    - find unpack('V'

    change this
    array_shift(unpack('V', $this->STREAM->read(4)));
    to
    $tmp=unpack('V', $this->STREAM->read(4));
    return array_shift($tmp);

    It worked on my blog..

  10. Lim_Dul
    Member
    Posted 7 years ago #

    I had the same problem after upgrading to 2.0.4

  11. benzin
    Member
    Posted 7 years ago #

    me to .. after uppgr to 2.0.4 .. if i trow back the old ( 2.0.3 ) file it works .. :(

  12. foolswisdom
    Moderator
    Posted 7 years ago #

    On wp-testers Ryan says he just checked in a fix which will be in WordPress 2.0.6 . It looks like it is r4555 branches/2.0/wp-includes/gettext.php: Can't pass function return to array_shift

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags