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

纵饮孤独 提交于 2019-12-19 19:49:16

问题


I have a WAMP (windows (7), apache, mysql, php) stack all setup and running. 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. 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

Naturally my first jump was i forgot to uncomment

extension=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.


回答1:


Do you have a php_soap.dll in your php/ext/ folder?




回答2:


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. I add it to the other one and the problem was solved




回答3:


To find the loaded php.ini file, load the phpinfo() page. Navigate to that path and open php.ini in notepad and search for php_soap.dll in it.

Uncomment this line and save the file before restarting the server.




回答4:


You've probably checked this, but what version of PHP are you using? SoapClient only available after 5.0.1




回答5:


Uncommenting it in php.ini didn't work. I had to uncomment it in php.ini-development and php.ini-production. They were all in C:/BitNami/wampstack-.../php



来源:https://stackoverflow.com/questions/6760716/wamp-stack-php-fatal-error-class-soapclient-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!