Categories
Uncategorized

Note to myself: 64bit

In order to use a localized version of WordPress on a 64bit system (gettext actually), you’ll need to make the following modi­fic­a­tion to wp-includes/gettext.php:

    // Caching can be turned off
    $this->enable_cache = $enable_cache;

    // $MAGIC1 = (int)0x950412de; //bug in PHP 5
    $MAGIC1 = (int) - 1794895138;
    // $MAGIC2 = (int)0xde120495; //bug
    $MAGIC2 = (int) - 569244523;
    // Required for 64bit gettext
    $MAGIC3 = (int)  2500072158;

    $this->STREAM = $Reader;
    $magic = $this->readint();
    // Required for 64bit gettext
    if ($magic == $MAGIC1 || $magic == $MAGIC3) {
      $this->BYTEORDER = 0;
    } elseif ($magic == $MAGIC2) {
      $this->BYTEORDER = 1;
    } else {
      $this->error = 1; // not MO file
      return false;
    }

(Found on Wordpess.de)