月別アーカイブ: 2015年7月




ソースインストールのPHPにsoapを追加するためコンパイルをして再インストール




投稿日:

configureでインストールしたphpはカスタマイズは便利ですが、管理が面倒なのも確かです。今回はsoapを後から追加する場合の手順をメモしておきます。



現在のconfigureの確認
[html]
mkdir /tmp/work/
cd /tmp/work/
php -i | grep configure > php_configure_20150701.txt
[/html]

現在認識されているモジュールがconfigureと同じかを目視確認。
[html]
# cat php_configure_20150701.txt
Configure Command => ‘./configure’ ‘–enable-zend-multibyte’ ‘–enable-mbstring’ ‘–enable-mbregex’ ‘–without-pgsql’ ‘–with-mysql=mysqlnd’ ‘–with-apxs2=/usr/local/apache2/bin/apxs’ ‘–enable-bcmath’ ‘–with-gd’ ‘–with-freetype-dir=/usr’ ‘–with-curl’ ‘–with-mysqli=mysqlnd’ ‘–with-pdo-mysql=mysqlnd’ ‘–with-mcrypt’ ‘–with-openssl=/usr/local/ssl’
[/html]

問題なければconfigureにはこれを使います。


soapを入れます。
[html]
# cd /usr/local/src/php-5.3.8/
# make clean
# ./configure –enable-zend-multibyte –enable-mbstring –enable-mbregex –without-pgsql –with-mysql=mysqlnd –with-apxs2=/usr/local/apache2/bin/apxs –enable-bcmath –with-gd –with-curl –with-mysqli=mysqlnd –with-pdo-mysql=mysqlnd –with-mcrypt –with-openssl=/usr/local/ssl –enable-soap
# make && make install
[/html]

完了です。


確認
[html]
cd /tmp/work/
php -i | grep configure > php_configure_20150701_after.txt

以下のコマンドでモジュールが表示されれば OK。
php -m
[/html]



丁寧に確認しながら実施すれば問題なく導入可能です。