CentOS 6.6 サーバーで PHP の SOAP を有効にする

CentOS 6.6 サーバーで PHP の SOAP を有効にする

サーバー上で SOAP を有効にしようとしています。SOAP はインストールされていますが、php_info に表示されません。

PHP バージョン 5.4.39

システム情報: Linux ip-xxx-xxx-xxx-xxx.secureserver.net 2.6.32-042stab106.4 #1 SMP Fri Mar 27 15:19:28 MSK 2015 x86_64

設定コマンド:

 './configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-pdo=shared' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr' 

読み込まれた設定ファイル: /usr/local/lib/php.ini

含まれるもの: [石鹸]

;extension=soap.so
; Enable soap extension module
extension="/usr/lib64/php/modules/soap.so"

他にどのような情報が役立つかはわかりませんが、どんな助けでも大歓迎です。

答え1

php-soapEPEL にあるので、コンパイルする必要はありません。

次のようにインストールします。

yum install epel-release
yum makecache
yum install php-soap

答え2

設定コマンドから、SOAP 設定でコンパイルされていません。以下のオプションを追加して PHP をコンパイルしてみてください。

--enable-soap=shared

したがって、コンパイルの完全なコマンドは次のように変更する必要があります。

'./configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-pdo=shared' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'--enable-soap=shared

次に、コンパイルされた SOAP モジュールを次のようにコピーします。

cp modules/soap.so /usr/lib64/php/modules

次のコマンドで Apache Web サーバーを再起動します。

/etc/init.d/httpd restart

次に、phpinfo() ページから SOAP 拡張機能が有効になっているかどうかを確認します。

答え3

次のコマンドを使用してインストールしてみてください。

yum install php54-php-soap

関連情報