<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ぱんぴーまっしぐら &#187; php</title>
	<atom:link href="http://blog.cheki.net/archives/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.cheki.net</link>
	<description>悲しみの果てに</description>
	<lastBuildDate>Wed, 13 Jul 2011 02:39:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Apacheのリバースプロキシを利用してSERVER_NAMEが取れない時</title>
		<link>http://blog.cheki.net/archives/2339</link>
		<comments>http://blog.cheki.net/archives/2339#comments</comments>
		<pubDate>Thu, 05 May 2011 15:26:36 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2339</guid>
		<description><![CDATA[Apacheのリバースプロキシを利用して、SERVER_NAMEがリバースプロキシサーバのIPになっちゃう場合は、リバースプロキシ側のApacheに以下の設定を追加。 ProxyPreserveHost On PHPプロ [...]]]></description>
			<content:encoded><![CDATA[<p>Apacheのリバースプロキシを利用して、SERVER_NAMEがリバースプロキシサーバのIPになっちゃう場合は、リバースプロキシ側のApacheに以下の設定を追加。</p>
<pre>
ProxyPreserveHost On
</pre>
<p>PHPプログラムでSERVER_NAMEの値を超利用しまくりな場合は、問題ないようならぶち込んじゃってもいいかも。</p>
<pre>
$_SERVER['SERVER_NAME'] = isset($_SERVER['X_FORWARDED_HOST']) ? $_SERVER['X_FORWARDED_HOST'] : $_SERVER['SERVER_NAME'];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2339/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OSXでApacheの利用</title>
		<link>http://blog.cheki.net/archives/2333</link>
		<comments>http://blog.cheki.net/archives/2333#comments</comments>
		<pubDate>Wed, 04 May 2011 02:32:09 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[macosx]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2333</guid>
		<description><![CDATA[システム環境設定＞共有＞Web共有をチェック httpd.confの設定 $ sudo vim /etc/apache2/httpd.conf 設定を上書きできないと困るので180行目のAllowOverrideを変更  [...]]]></description>
			<content:encoded><![CDATA[<p>システム環境設定＞共有＞Web共有をチェック</p>
<p>httpd.confの設定</p>
<pre>
$ sudo vim /etc/apache2/httpd.conf
</pre>
<p>設定を上書きできないと困るので180行目のAllowOverrideを変更</p>
<pre>
    AllowOverride All
</pre>
<p>PHPを利用可能にするため116行目のコメントアウトを外す</p>
<pre>
LoadModule php5_module        libexec/apache2/libphp5.so
</pre>
<p>ヴァーチャルホストの設定ファイルvhosts以下に配置し読み込めるように最後の行に追加<br />
デフォルトだと469行目でヴァーチャルホストの設定を読み込んでいるようだが、最終行のIncludeでPHPの設定が行われているので、それ以降に設定を書かないとPHPを利用できないため</p>
<pre>
Include /private/etc/apache2/vhosts/*.conf
</pre>
<p>ヴァーチャルホストの設定ファイルを作成<br />
ファイル名はお好みで</p>
<pre>
$ sudo vim /etc/apache2/vhosts/httpd-vhosts-hoge.example.com.conf
</pre>
<p>ファイルはhogeユーザのSite以下にドメインディレクトリを作成し、そこをドキュメントルートにしています<br />
localhostから接続できるようにAllow fromを追加</p>
<pre>
&lt;VirtualHost *:80&gt;
    ServerName hoge.example.com
    DocumentRoot /Users/hoge/Sites/hoge.example.com
    &lt;Directory /Users/hoge/Sites/hoge.example.com&gt;
        Allow from ::1
        Allow from 127.0.0.1
    &lt;/Directory&gt;
    ErrorLog /var/log/apache2/hoge.example.com-error_log
    CustomLog /var/log/apache2/hoge.example.com-access_log combined
&lt;/VirtualHost&gt;
</pre>
<p>Apache設定ファイルにミスがないかチェック</p>
<pre>
sudo apache2ctl configtest
</pre>
<p>大丈夫なようなら再起動</p>
<pre>
sudo apache2ctl -k restart
</pre>
<p>hostsファイルに名前解決できるように追加</p>
<pre>
sudo vim /etc/hosts
</pre>
<pre>
::1 hoge.example.com
127.0.0.1 hoge.example.com
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2333/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitterのstatus IDが64bitになったことによる問題と対策</title>
		<link>http://blog.cheki.net/archives/2308</link>
		<comments>http://blog.cheki.net/archives/2308#comments</comments>
		<pubDate>Sun, 07 Nov 2010 05:03:06 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[日記]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2308</guid>
		<description><![CDATA[Snowflake: An update and some very important information &#8211; Twitter Development Talk &#124; Google グループ Twitte [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups.google.com/group/twitter-development-talk/browse_thread/thread/6a16efa375532182?pli=1">Snowflake: An update and some very important information &#8211; Twitter Development Talk | Google グループ</a><br />
<a href="http://blog.fkoji.com/2010/10201250.html">TwitterのIDが64bitになるとJavaScript等で問題が出るので対策を &#8211; F.Ko-Jiの「一秒後は未来」</a></p>
<p>事前に告知されていましたが、日本時間で11月5日の朝6時にstatus IDが41bitまでの値を利用するようになりました。</p>
<pre>
     29535221410 以前
1036396793962496 以後
</pre>
<p>桁が大分増えましたね。</p>
<p>10月20日からレスポンスにstatus IDの文字列である「id_str」が含まれるようになりました。<br />
2週間という短い期間での移行、そもそも告知自体知らない人も多かったかも知れませんが、対応せず「id」の値を利用していた場合不具合が生じる場合があります。</p>
<p>言語、OSによって内部で利用するstatus IDである「id」の型が異なると思いますが、32bitOS環境のPHPでJSONのデコードにjson_decode関数を利用している場合、「id」はfloat型としていました。<br />
float型、浮動小数点数はマニュアルにあるように、<a href="http://jp.php.net/manual/ja/language.types.float.php">およそ 10 進数で 14 桁の精度</a>であり、新しいstatus IDは正確には扱えず以下のようになります。</p>
<pre>
$ php -r 'var_dump(1036396793962496);'
float(1.0363967939625E+15)
</pre>
<p>この値をMySQLのinteger型に保存すると、1036396793962500となります。</p>
<p>対策として、「id」ではなく「id_str」を利用するのですが、修正箇所が多く容易ではなかったため、一時しのぎとして取得したJSONに手を加え、「id」自体を文字列型として扱うことにしました。</p>
<pre>
$json = preg_replace('/"(id|in_reply_to_status_id)":(\d+)/', '"$1":"$2"', $json);
</pre>
<p>ツイート文字列にも影響がありますが、まず無いであろうと思われる文字列と、近いうちに「id_str」を利用するよう修正するということで。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2308/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mac OS XにPEARのインストール</title>
		<link>http://blog.cheki.net/archives/2296</link>
		<comments>http://blog.cheki.net/archives/2296#comments</comments>
		<pubDate>Fri, 29 Oct 2010 06:21:13 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[macosx]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2296</guid>
		<description><![CDATA[curl http://pear.php.net/go-pear &#124; sudo php 設定はこんな風にした。 1. Installation prefix ($prefix) : /Library/Php/Pear 2 [...]]]></description>
			<content:encoded><![CDATA[<pre>curl http://pear.php.net/go-pear | sudo php</pre>
<p>設定はこんな風にした。</p>
<pre>
 1. Installation prefix ($prefix) : /Library/Php/Pear
 2. Temporary files directory     : $prefix/temp
 3. Binaries directory            : /usr/bin
 4. PHP code directory ($php_dir) : $prefix/PEAR
 5. Documentation base directory  : $php_dir/docs
 6. Data base directory           : $php_dir/data
 7. Tests base directory          : $php_dir/tests
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2296/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP5.3.0～2の罠</title>
		<link>http://blog.cheki.net/archives/2242</link>
		<comments>http://blog.cheki.net/archives/2242#comments</comments>
		<pubDate>Thu, 02 Sep 2010 07:43:18 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[pear]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2242</guid>
		<description><![CDATA[PHP5.3.3では以下のような「後方非互換の変更」が加えられています。 Methods with the same name as the last element of a namespaced class name [...]]]></description>
			<content:encoded><![CDATA[<p>PHP5.3.3では以下のような「後方非互換の変更」が加えられています。</p>
<blockquote><p>
Methods with the same name as the last element of a namespaced class name will no longer be treated as constructor. This change doesn&#8217;t affect non-namespaced classes.</p>
<pre>&lt;?php
namespace Foo;
class Bar {
    public function Bar() {
        // treated as constructor in PHP 5.3.0-5.3.2
        // treated as regular method in PHP 5.3.3
    }
}
?&gt;</pre>
<p>There is no impact on migration from 5.2.x because namespaces were only introduced in PHP 5.3.<br />
<a href="http://www.php.net/archive/2010.php#id2010-07-22-2">PHP 5.3.3 Released!</a>
</p></blockquote>
<p>どういう事かというと、</p>
<pre>
&lt;?php
class A
{
  function A()
  {
    echo __CLASS__;
  }
}
class B extends A
{
}
class C extends B
{
  function C()
  {
    parent::B();
  }
}
new C();
</pre>
<p>結果<br />
PHP5.3.2</p>
<pre>PHP Fatal error:  Call to undefined method B::B()</pre>
<p>PHP5.3.3</p>
<pre>A</pre>
<p>PHP5.3.xによってPHP4に対する後方互換が崩れたんですが、PHP5.3.3でPHP5.3.x非互換となる代わりにPHP4後方互換が一部戻ったという話。<br />
PEAR::Image_Graphで問題でてました。<br />
PHP5の環境なら以下のように書くので問題は起こらないんですけどね。</p>
<pre>
&lt;?php
class A
{
  public function __construct()
  {
    echo __CLASS__;
  }
}
class B extends A
{
}
class C extends B
{
  public function __construct()
  {
    parent::__construct();
  }
}
new C();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2242/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PEAR::Services_Twitterのパッチ</title>
		<link>http://blog.cheki.net/archives/2218</link>
		<comments>http://blog.cheki.net/archives/2218#comments</comments>
		<pubDate>Tue, 24 Aug 2010 10:22:28 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2218</guid>
		<description><![CDATA[Services_Twitter_r302262.diff 7904 byte [md5] 89930ad5cf340af7a101ed74261d4a34 修正 sendOAuthRequest()メソッドでHTTP_ [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.cheki.net/Services_Twitter_r302262.diff">Services_Twitter_r302262.diff</a><br />
7904 byte<br />
[md5] 89930ad5cf340af7a101ed74261d4a34</p>
<p>修正<br />
sendOAuthRequest()メソッドでHTTP_OAuth_Exceptionがthrowされる問題<br />
serchメソッドでhttp://search.twitter.comを利用しない問題<br />
blocks/createメソッドでuser_id、screen_nameを指定できない問題<br />
blocks/destroyメソッドでuser_id、screen_nameを指定できない問題<br />
テストでOAuthの場合sourceはアプリケーションになる問題<br />
テストでutf8テストが二重投稿になる問題<br />
テストでOAuthの場合オブジェクトがHTTP_OAuth_Consumer_Responseになる問題</p>
<p>追加<br />
blocks/bloking/idsメソッド (call $t->blocks->blocking_ids())</p>
<pre>
$ svn export -r 302262 http://svn.php.net/repository/pear/packages/Services_Twitter/trunk Services_Twitter
$ wget http://blog.cheki.net/Services_Twitter_r302262.diff
$ cd Services_Twitter
$ patch -p0 < ../services_twitter.diff
patching file Services/Twitter.php
patching file data/api.xml
patching file tests/900-exceptions.phpt
patching file tests/910-options.phpt
patching file tests/920-utf8.phpt
patching file tests/data/utf8-2.dat
patching file tests/setup.php
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2218/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PEAR::Services_Twitterをforkした</title>
		<link>http://blog.cheki.net/archives/2207</link>
		<comments>http://blog.cheki.net/archives/2207#comments</comments>
		<pubDate>Wed, 18 Aug 2010 17:35:58 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2207</guid>
		<description><![CDATA[Services_Twitter 以前パッチが取り込まれたけど、Basic認証でしか確認してなくて、OAuthだとDELETEメソッドで問題がでてました。 その他なんか迷走してる感じだったので、パッチ送りたいなとPEAR [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pear.php.net/package/Services_Twitter/">Services_Twitter</a><br />
以前パッチが取り込まれたけど、Basic認証でしか確認してなくて、OAuthだとDELETEメソッドで問題がでてました。<br />
その他なんか迷走してる感じだったので、パッチ送りたいなとPEARアカウントを取得しようと申請したのですがレスポンスがないので、とりあえずgithubにぶち込んだ次第です。<br />
バグレポートもパッチ投げるにもPEARアカウントないと半匿名な感じになるので。</p>
<p><a href="http://github.com/cockok/Services_Twitter">cockok&apos;s Services_Twitter at master &#8211; GitHub</a></p>
<p>リリース最新は0.6.2ですが、trunkが変更されてたのでそちらをfork。<br />
あいきゃんとすぴーくいんぐりっしゅ。<br />
もちろん書くのも。</p>
<p>ちなみに、DELETEメソッドででる問題は、RFC2616に以下のようなところ。</p>
<blockquote><p>The DELETE method requests that the origin server delete the resource identified by the Request-URI.<br />
<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7">HTTP/1.1: Method Definitions</a></p></blockquote>
<p>こっちはPEAR::HTTP_OAuthの問題。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2207/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PEARをローカルにインストール</title>
		<link>http://blog.cheki.net/archives/2192</link>
		<comments>http://blog.cheki.net/archives/2192#comments</comments>
		<pubDate>Wed, 11 Aug 2010 01:56:58 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[pear]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2192</guid>
		<description><![CDATA[Manual :: 共有ホストでの PEAR のローカルコピーのインストール 既にpearコマンドが利用可能な場合。 $ pear config-create /path/to ~/.pearrc /path/to/pe [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pear.php.net/manual/ja/installation.shared.php">Manual :: 共有ホストでの PEAR のローカルコピーのインストール</a></p>
<p>既にpearコマンドが利用可能な場合。</p>
<pre>
$ pear config-create /path/to ~/.pearrc
</pre>
<p>/path/to/pear以下に諸々配置される設定ファイルが~/.pearrcとして作成される。<br />
この場合、PEARディレクトリは/path/to/pear/phpとなる。</p>
<p>ディレクトリ等、設定をを変更したい場合は、通常通りpear config-setコマンドで。</p>
<p>phpコマンドを実行する際にinclude_pathの設定をしたいが、オプションでは指定できないので、php.iniを別途準備し読むように指定するaliasを設定。</p>
<pre>
$ cp /etc/php.ini /path/to
$ vim /path/to/php.ini
$ alias php='php -c /path/to/php.ini'
</pre>
<p>php.iniのinclude_pathの設定は以下のようにローカルのPEARディレクトリしか読み込まない、または、優先的に読み込むように設定。</p>
<pre>
include_path = ".:/path/to/php"
#include_path = ".:/path/to/php:/usr/share/pear:/usr/share/php"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2192/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPでクライアントベースのOAuth認証</title>
		<link>http://blog.cheki.net/archives/2193</link>
		<comments>http://blog.cheki.net/archives/2193#comments</comments>
		<pubDate>Fri, 06 Aug 2010 19:32:17 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2193</guid>
		<description><![CDATA[まさに誰得。 ブラウザベースは情報いっぱいあったんだけど、クライアントベースが見つからなかったので。 取得したaccess_token、access_token_secretを利用の仕方は下記で。 PEAR::HTTP_ [...]]]></description>
			<content:encoded><![CDATA[<p>まさに誰得。<br />
ブラウザベースは情報いっぱいあったんだけど、クライアントベースが見つからなかったので。<br />
取得したaccess_token、access_token_secretを利用の仕方は下記で。<br />
<a href="http://blog.cheki.net/archives/1630">PEAR::HTTP_OAuthでxAuth – ぱんぴーまっしぐら</a></p>
<pre>
#!/usr/bin/env php
&lt;?php
require_once &#039;HTTP/OAuth/Consumer.php&#039;;

define(&#039;CONSUMER_KEY&#039;,    &#039;xxxxxxxxxxxxxxxxxxxx&#039;);
define(&#039;CONSUMER_SECRET&#039;, &#039;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#039;);

try {

  $http_request = new HTTP_Request2();
  $http_request-&gt;setConfig(&#039;ssl_verify_peer&#039;, false);

  $consumer_request = new HTTP_OAuth_Consumer_Request();
  $consumer_request-&gt;accept($http_request);

  $consumer = new HTTP_OAuth_Consumer(CONSUMER_KEY, CONSUMER_SECRET);
  $consumer-&gt;accept($consumer_request);

  $consumer-&gt;getRequestToken(&#039;http://twitter.com/oauth/request_token&#039;);
  $url = $consumer-&gt;getAuthorizeUrl(&#039;http://twitter.com/oauth/authorize&#039;);

  if (!$stdin = fopen(&#039;php://stdin&#039;, &#039;r&#039;)) {
    throw new Exception(&#039;stdin open failed&#039;);
  }

  echo &#039;Visit the following URL in your browser to authenticate twitter: &#039;;
  echo $url.&quot;\n&quot;;
  echo &#039;Enter Twitter OAuth PIN: &#039;;
  $pin = trim(fgets($stdin, 64));
  $consumer-&gt;getAccessToken(&#039;http://twitter.com/oauth/access_token&#039;, $pin);

  echo &#039;access_token: &#039;.$consumer-&gt;getToken().&quot;\n&quot;;
  echo &#039;access_token_secret: &#039;.$consumer-&gt;getTokenSecret().&quot;\n&quot;;

} catch (Exception $e) {

  echo $e-&gt;getMessage().&#039; in &#039;.$e-&gt;getFile().&#039; line &#039;.$e-&gt;getLine().&quot;\n&quot;;
  exit(1);

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2193/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>peclのjsonはnumber型をintに桁落ちする</title>
		<link>http://blog.cheki.net/archives/1602</link>
		<comments>http://blog.cheki.net/archives/1602#comments</comments>
		<pubDate>Tue, 26 Jan 2010 15:00:00 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/achives/1602</guid>
		<description><![CDATA[いろいろな制約の関係でCentOS5系のPHP5.1.6でjsonの処理を行わなければならず、Jsphonだとパフォーマンス的に厳しいのでpeclのjsonを利用することになりました。 利用していたところ、mumber型 [...]]]></description>
			<content:encoded><![CDATA[<p>いろいろな制約の関係でCentOS5系のPHP5.1.6でjsonの処理を行わなければならず、Jsphonだとパフォーマンス的に厳しいのでpeclのjsonを利用することになりました。</p>
<p>利用していたところ、mumber型がint型に桁落ちする現象に遭遇。</p>
<pre><code>
$ php -r "var_dump(json_decode('{\"id\":8271518654}'));"
object(stdClass)#1 (1) {
  ["id"]=>
  int(2147483647)
}
</code></pre>
<p>調べてみたところ、PHP5.2.1の時代にバグレポートされてその後fixされたが、peclにはバックポートされてないようでした。</p>
<p><a href="http://bugs.php.net/bug.php?id=41567">PHP Bugs: #41567: json_encode double conversion is inconsistent with PHP</a><br />
バグレポートを参考に修正し、phpizeしてみましたが変わらず。</p>
<p>PHP5.2で取り込まれてるわけですが、そこでphpizeすればいけるんじゃ？ということで5.2.3のソースをダウンロードしphpize後make成功したのでインストールしてみましたが件の件は修正されていませんでした。</p>
<p>結局、PHP5.2.4で修正されていることを確認したのでここに軟着陸。</p>
<pre><code>
$ cd /usr/local/src
$ wget http://museum.php.net/php5/php-5.2.4.tar.gz
$ tar zxf php-5.2.4.tar.gz
$ cd php-5.2.4/ext/json
$ phpize
$ ./configure
$ make
$ sudo make install
$ php -i | grep json
$ php -r "var_dump(json_decode('{\"id\":8271518654}'));"
object(stdClass)#1 (1) {
  ["id"]=>
  float(8271518654)
}
</code></pre>
<p>make通ったのはPHP5.2.9まで、PHP5.2.5～PHP5.2.9はjson_encodeで問題が見つかった為結局PHP5.2.4のを利用することに。<br />
もうちょい時間があったらしっかり検証したいとこですが。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/1602/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

