5

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.

2
  • 2
    First idea: use phpinfo() to check if you edited the right php.ini file Jul 20, 2011 at 11:05
  • did that not listed. Did edit the correct php.ini to my knowledge though
    – chris
    Jul 20, 2011 at 11:22

5 Answers 5

13

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

5
  • Thx Hossein, you made my day :D Solved!
    – Wgenie
    Aug 29, 2012 at 16:52
  • 2
    This is the solution if you enabled SOAP or any other extension through the WAMP Notification area button.
    – Tru
    Mar 27, 2013 at 7:03
  • Hi, I enabled soap in the php.ini of wamp PHP and in the one of Apache of my wampserver 3.0.0 (php 5.6), I enabled openssl too and I restarted all the services but the class SoapClient is still not found. I checked in the phpinfo() and soap is enabled. I don't understand why the class is not found. Please help.
    – Eve
    Sep 6, 2019 at 13:00
  • @Eve As far as I can see, You have done everything right, but there are sometimes slight spelling problems, I suggest you use get_declared_classes method to see if SoapClient exists among your declared classes. Oct 7, 2019 at 13:33
  • 1
    @HosseinShahdoost Hi, thank you for your answer. I don't remember very well the problem but I was in a Symfony project and I believe that I had to write new \SoapClient(...) with a back slash at the beginning instead of new SoapClient(...) to tell to Symfony that it isn't a framework function but a native php one.
    – Eve
    Oct 8, 2019 at 14:22
12

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

1
  • php_soap.dll, is found in the php/ext/ folder.
    – chris
    Jul 20, 2011 at 11:21
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.

1

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

0
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.