我正在尝试在我的服务器上启用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
configuration命令:
'./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'
加载的configuration文件:/usr/local/lib/php.ini
其中包含:[肥皂]
;extension=soap.so ; Enable soap extension module extension="/usr/lib64/php/modules/soap.so"
我不确定其他信息会有用,但任何帮助将不胜感激。
php-soap在EPEL中,所以我不打扰编译它。
像这样安装:
yum install epel-release yum makecache yum install php-soap
从您的configuration命令中,您没有使用SOAPconfiguration进行编译。 请尝试通过添加下面的选项来编译你的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扩展。
尝试使用以下命令进行安装。
yum install php54-php-soap