Home > Article > Backend Development > PHP Class SoapClient not found processing method
This article explains how to handle PHP Class SoapClient not found.
To use SoapClient, new got a prompt Class ‘SoapClient’ not found, and checked phpinfo. The reason is that this extension was not compiled at the beginning, so I had to add it now.
When calling webservice, php reports an error similar to the following:
( ! ) Fatal error: Class 'SoapClient' not found in E:/WebSrv/CI/system/libraries/WebService.php on line 17
Solution:
打开php.ini,找到php_soap.dll , 把前面的分号去掉 ;extension=php_soap.dll 前提是,已经安装了 php_soap.dll 笔者的 PHP 安装在 /usr/local/php/ 目录下,如果没有安装可以参考下面的方法 $ cd /home/downloads/php-5.6.12 # 进入到 PHP 源码目录 $ cd ext/soap # 进入 soap 扩展目录 $ /usr/local/php/bin/phpize # 准备添加扩展 $ ./configure -with-php-config=/usr/local/php/bin/php-config --enable-soap # 启用 SOAP $ make $ make install
After the extension installation is completed, it will prompt that the extension has been installed in this directory:
Installing shared extensions: /usr /local/php/lib/php/extensions/no-debug-non-zts-20131226/
Edit the php.ini file, enable the extension_dir extension directory, and add the soap.so extension:
extension=soap.so # 添加 SOAP 扩展 重启 php-fpm 使生效 kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid` Windows 下编辑 php.ini 取消该行注释即可 extension=php_soap.dll
This article explains how to handle PHP Class SoapClient not found. For more related content, please pay attention to the PHP Chinese website.
Related recommendations:
How to implement the mongoDB singleton mode operation class in php
PHP WeChat development: WeChat recording temporary Transfer to permanent storage
php uses the imagecopymerge() function to create a translucent watermark method
The above is the detailed content of PHP Class SoapClient not found processing method. For more information, please follow other related articles on the PHP Chinese website!