I have recently getting the follwing error when using soap in my php.

Fatal error: Class 'SoapClient' not found

My php version : PHP 5.4.19 (cli)

php-soap.x86_64 0:5.3.3-23.el6_4

Currently using centos

$client = new SoapClient('https://sandbox.cashu.com/merchants/cashUPayments.wsdl',array("trace" => 1));

Kindly, let me know how to fix it out. I have tried lot of steps like yum install php-soap etc. Even, i could not find soap word in my phpinfo().


You have to enable the module, you can do this at compilation or by adding:


to the configuration file of PHP, usually there is a conf.d directory where you can create files with these instructions, for example in my machine is under /etc/php5/apache2/conf.d/, you create soap.ini with permissions and save the above instruction. After you reload Apache, the module should be loaded.

Note: in linux you have multiple php.ini files and so also multiple conf.d directories, depending if this is for apache2, cli, cgi, fpm... so you can enable soap in the cgi version, but it will be disabled in apache2, for example.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.