PHPをYumで5.2.xにアップデートしてみた

CentOS標準のリポジトリだとPHPの最新版は入れられないので、remiというリポジトリを追加する。
 

# リポジトリ追加
cd /usr/src/redhat/RPMS/i386
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
wget http://rpms.famillecollet.com/el5.i386/remi-release-5-7.el5.remi.noarch.rpm
#rpm -Uvh epel-release-5-3.noarch.rpm remi-release-5-7.el5.remi.noarch.rpm	#これでもいい
createrepo .
yum --enablerepo=local install epel-release remi-release

# PHPアップデート
yum -y install php-pecl-apc
yum -y --enablerepo=remi update mysql-5.1.36
yum -y --enablerepo=remi update php*

 
バージョン確認。

# php -v
PHP Warning:  PHP Startup: ffmpeg: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0

Warning: PHP Startup: ffmpeg: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: idn: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0

Warning: PHP Startup: idn: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: ming: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0

Warning: PHP Startup: ming: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: OAuth: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0

Warning: PHP Startup: OAuth: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
 in Unknown on line 0
PHP 5.2.10 (cli) (built: Jun 21 2009 11:10:43)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

 
エラー発生。
どうせだから拡張部分もアップデートする。

# ffmpeg
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
tar -xvf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
phpize
make
make install

# idn
mv /etc/php.d/idn.ini /etc/php.d/idn.ini_
pecl install idn
mv /etc/php.d/idn.ini_ /etc/php.d/idn.ini

# ming
cvs -z3 -d:pserver:anonymous@ming.cvs.sourceforge.net:/cvsroot/ming co -P ming
cd ming
./autogen.sh
./configure --enable-php
make
make install

# oauth
pecl uninstall OAuth
pecl install OAuth-beta

 
再度バージョン確認。

# php -v
PHP 5.2.10 (cli) (built: Jun 21 2009 11:10:43)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

 
最新版になった。
 
アップデート前

# rpm -aq | grep php | sort
php-5.1.6-23.2.el5_3
php-cli-5.1.6-23.2.el5_3
php-common-5.1.6-23.2.el5_3
php-devel-5.1.6-23.2.el5_3
php-gd-5.1.6-23.2.el5_3
php-json-5.1.6_1.2.1-1.aurore
php-ldap-5.1.6-23.2.el5_3
php-mbstring-5.1.6-23.2.el5_3
php-mcrypt-5.1.6-15.el5.centos.1
php-mysql-5.1.6-23.2.el5_3
php-pdo-5.1.6-23.2.el5_3
php-pear-1.4.9-4.el5.1
php-pgsql-5.1.6-23.2.el5_3
php-soap-5.1.6-23.2.el5_3
php-xml-5.1.6-23.2.el5_3

 
アップデート後

# rpm -aq | grep php | sort
php-5.2.10-1.el5.remi
php-cli-5.2.10-1.el5.remi
php-common-5.2.10-1.el5.remi
php-devel-5.2.10-1.el5.remi
php-gd-5.2.10-1.el5.remi
php-ldap-5.2.10-1.el5.remi
php-mbstring-5.2.10-1.el5.remi
php-mcrypt-5.2.10-1.el5.remi
php-mysql-5.2.10-1.el5.remi
php-pdo-5.2.10-1.el5.remi
php-pear-1.8.1-1.el5.remi
php-pecl-apc-3.0.19-1.el5.remi
php-pgsql-5.2.10-1.el5.remi
php-soap-5.2.10-1.el5.remi
php-xml-5.2.10-1.el5.remi

 
これでShindigを入れられる!
と思って入れてみたら、ログにこんなの出てる。

[Tue Aug 04 02:36:48 2009] [error] [client 192.168.0.20] PHP Fatal error:  Cannot redeclare class OAuthException in /var/www/virtual/shindig-1.0/src/gadgets/oauth/OAuth.php on line 43, referer: http://xxx/gadgets/ifr?url=http://www.labpixies.com/campaigns/weather/weather.xml

OAuthExceptionっていう空っぽのクラスを全てをコメントアウト
こんなの出た。

[Tue Aug 04 03:42:34 2009] [error] [client 192.168.0.20] PHP Fatal error:  Cannot redeclare class OAuth in /var/www/virtual/shindig-1.0/src/gadgets/oauth/OAuth.php on line 21, referer: http://xxx/gadgets/ifr?url=http://www.labpixies.com/campaigns/weather/weather.xml

 
peclでOAuth-betaを入れている場合は、class OAuthの定義を全てコメントアウト
それでエラーは出なくなって、ニューヨークの天気が出た。
でも、ToDoはエラー出る。

Error
Invalid XML structure in message bundle
Debug backtrace
Array
(
    [0] => Array
        (
            [file] => /var/www/virtual/shindig-1.0/src/gadgets/servlet/GadgetRenderingServlet.php
            [line] => 83
            [function] => outputError
            [class] => GadgetRenderingServlet
            [object] => GadgetRenderingServlet Object
                (
                    [context:private] => GadgetContext Object
                        (
                            [httpFetcher:protected] => BasicRemoteContent Object
                                (
                                )
〜〜〜 以下略 〜〜〜

 
1.1だとこんなエラー。

Error parsing gadget xml: Are you sure you don?t want to be shared to this list anymore? -------------------------------------^ Fatal Error 9: Input is not proper UTF-8, indicate encoding ! Bytes: 0x92 0x74 0x20 0x77 Line: 54 Column: 37 

 
XenShindig専用マシンでも同じエラーが出てる。
とりあえず、一応動いたからそれでいいや。
 
http://xxx/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml
http://xxx/gadgets/ifr?url=http://www.labpixies.com/campaigns/weather/weather.xml