macmiller
macmiller

Reputation: 324

PHP Fatal error: Class 'SoapClient' not found in /home/ec2-user

There are a number of similar topics, however I have not been able to solve this problem. When I run a php script on an EC2 Linux (Amazon Linux AMI 2014.03.1) I get the above error.

When I do a system find I only can locate one php.ini file. It is located in /etc/php.ini. From reading elsewhere I should not alter this file but create my own .ini file in /etc/php.d. Therefore I have created a file called myphp.ini with the following line of code at the top.

extension=php_soap.dll or extension=php_soap.so

now when I attempt to run the php script I get the following: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_soap.dll' - /usr/lib64/php/modules/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0 (.. same for both php_soap.so and dll)

Not quite sure what to do from here, just looking for the easiest way to enable SOAP. I have two linux installations that are similar, both have the same problem (ie it is not specific to EC2).

Upvotes: 1

Views: 1819

Answers (1)

Bogdan Savluk
Bogdan Savluk

Reputation: 6312

Before enabling it, you should install it...

For example, on Debian based distro it would be sudo apt-get install php-soap (also this will create required ini file for extension)

Upvotes: 3

Related Questions