Class 'SoapClient' not found

Posted on 2009-12-23
Last Modified: 2012-08-13

I hope someone can help me as I am incredibly confused !

I had some SOAP code that was working great earlier today .... no problems at all.

Now I come back to do some more work and I'm getting the following error :

"PHP Fatal error:  Class 'SoapClient' not found in  xxxx on line yy".

I cannot understand why this is suddenly happening.  No changes have occured on the server as it is a box under my control, so nobody has messed with any config.

I created a simple test (see snipped below) and that fails too with the same error !

As you can see from the phpinfo screenshot, SOAP is STILL enabled !! No change there.

HELP !!!!!!!!!!!!

$client = new SoapClient("http://******/****/lookup.asmx?wsdl");


Open in new window

Question by:TwentyFourSeven
    LVL 107

    Expert Comment

    by:Ray Paseur
    This is advice, and not meant to be a flip answer.  Stop using SOAP once and for all and choose a REST design for your APIs.  One of my colleagues says bluntly that SOAP is the devil.  I stop just short of that, but I can tell you that the number of man hours wasted by the unnecessarily elaborate and complex design of SOAP is astonishing.

    Good luck with it - you have my sympathies, ~Ray
    LVL 34

    Accepted Solution

    If you have control of the server then you have access to the error logs. Check the Apache logs (usually in /var/log/apache2) and any separate error logs for PHP and the domain involved.

    Have a look in syslogd just in case it is reported there as well.

    Let us know if there are any messages related to PHP or SOAP. If all else fails check the installation of php5-soap at the server level. Just because it is enabled at the PHP level does not mean it is working OK.

    Featured Post

    Easy Project Management (No User Manual Required)

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to count occurrences of each item in an array.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now