我们有CentOS的VPS我用以下命令安装了soap.
yum install php-soap
Run Code Online (Sandbox Code Playgroud)
然后我去php.ini取消评论soap扩展.它不存在,我添加了自己的以下行.
extension=soap.so
Run Code Online (Sandbox Code Playgroud)
然后我用以下命令重启服务器
service httpd restart
Run Code Online (Sandbox Code Playgroud)
但SOAP仍未启用.因为我得到致命错误:类'SoapClient'如果我尝试再次安装它.我得到以下信息.
Package php-soap-5.3.3-27.el6_5.x86_64 already installed and latest version
Run Code Online (Sandbox Code Playgroud)
我尝试使用以下命令重新配置PHP.
php-config '--disable-fileinfo' '--disable-pdo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-libxml' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pic' '--with-zlib' '--with-zlib-dir=/usr' '--enable-soap'
Run Code Online (Sandbox Code Playgroud)
有帮助吗?