简体   繁体   English

WAMP 堆栈 PHP “致命错误:未找到 Class 'SoapClient'”

[英]WAMP Stack PHP “Fatal error: Class 'SoapClient' not found”

I have a WAMP (windows (7), apache, mysql, php) stack all setup and running.我有一个 WAMP(Windows (7)、apache、mysql、php)堆栈,所有设置和运行。 All is well and it is working and running as expected.一切都很好,它正在按预期工作和运行。 I use the machine primarily for development however it is accessible to the outside world.我主要使用这台机器进行开发,但是它可以被外界访问。 Anyways..无论如何..

I recently come cross a client with a pre-existing SaaS product where cURL, SOAP, and the like are used.我最近遇到一个客户,它使用了一个预先存在的 SaaS 产品,其中使用了 cURL、SOAP 等。 I drop there system onto my server and a bit of jumping around to set it up, get it setup, start plugging away at things to only come across a section where I am getting我将那里的系统放到我的服务器上,然后跳来跳去进行设置,进行设置,开始处理事情,只遇到我正在获取的部分

Fatal error: Class 'SoapClient' not found致命错误:未找到 Class 'SoapClient'

Naturally my first jump was i forgot to uncomment自然,我的第一次跳跃是我忘了取消注释

extension=php_soap.dll扩展=php_soap.dll

Which was true, so I did un-comment it, save the file, then restart the server.这是真的,所以我取消了注释,保存文件,然后重新启动服务器。 However the problem still exists (so I tried even rebooting), now I am stuck as I am not a guru with WAMP/LAMP stacks and configuring them I can only just get around them as needed til now.但是问题仍然存在(所以我什至尝试重新启动),现在我被卡住了,因为我不是 WAMP/LAMP 堆栈的专家并且配置它们我只能根据需要绕过它们直到现在。

This might be a little late now, But I had the similar problem with wamp, and it was because php.ini was different in apache and in cli mode, there was one in apache folder which had php_soap.dll included but the one in php folder which cli was using didn't have it. This might be a little late now, But I had the similar problem with wamp, and it was because php.ini was different in apache and in cli mode, there was one in apache folder which had php_soap.dll included but the one in php cli使用的文件夹没有它。 I add it to the other one and the problem was solved我把它加到另一个上,问题就解决了

Do you have a php_soap.dll in your php/ext/ folder?你的php/ext/文件夹中有php_soap.dll吗?

To find the loaded php.ini file, load the phpinfo() page.要查找加载的php.ini文件,请加载phpinfo()页面。 Navigate to that path and open php.ini in notepad and search for php_soap.dll in it.导航到该路径并在记事本中打开php.ini并在其中搜索php_soap.dll

Uncomment this line and save the file before restarting the server.取消注释此行并在重新启动服务器之前保存文件。

You've probably checked this, but what version of PHP are you using?您可能已经检查过这个,但是您使用的是哪个版本的 PHP? SoapClient only available after 5.0.1 SoapClient 仅在 5.0.1 之后可用

Uncommenting it in php.ini didn't work.php.ini中取消注释不起作用。 I had to uncomment it in php.ini-development and php.ini-production .我不得不在php.ini-developmentphp.ini-production中取消注释它。 They were all in C:/BitNami/wampstack-.../php他们都在C:/BitNami/wampstack-.../php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM