RSS Feed

WordPress magyarítás 64 bites szerveren 2

2007. 11. 15. by nyu

Sikerült újabb infókat szereznem erről a problémáról. Úgy tűnik ebben a support bejegyzésben leírt patch és némi Trac olvasgatás után megvan a megoldás 32 és 64 bites szerverekre. A következő kódrészletre cseréljétek ki a wp-includes/gettext.php 105-124 sorait:

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

		// $MAGIC1 = (int)0x950412de;
		//bug in PHP 5.0.2
		//see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
		$MAGIC1 = (int) - 1794895138;
		// $MAGIC2 = (int)0xde120495; //bug
		$MAGIC2 = (int) - 569244523;
		// 64-bit fix
		$MAGIC3 = (int) 2500072158;

		$this->STREAM = $Reader;
		$magic = $this->readint();

		// to make sure it works for 64-bit platforms
		if ($magic == $MAGIC1 || $magic == $MAGIC3) {
			$this->BYTEORDER = 0;
		} elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
			$this->BYTEORDER = 1;
		} else {
			$this->error = 1; // not MO file
			return false;
		}

Biztos, ami biztos alapon, ide:gettext.php rakom a patchelt fájt is, csak írjátok felül a wp-includes-ban levőt.


1 Comment »

  1. HeavyGod says:

    Really good and really interesting post. I expect (and other readers maybe :) ) new useful posts from you!
    Good luck and successes in blogging!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>