Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable --enable-soap in php on linux?

That's much the question. I have PHP 5.2.9 on Apache and I cannot upgrade PHP. Is there a way for me to enable SOAP in PHP 5.2.9? The PHP manual did not help at all when it said, "To enable SOAP support, configure PHP with --enable-soap ." How do I configure?

like image 520
netrox Avatar asked Jul 20 '12 17:07

netrox


People also ask

How can I tell if SOAP is enabled in PHP?

In PHP to check whether SOAP enabled or not use built in function class_exists() : var_dump(class_exists("SOAPClient")); It also could be user to check any of modules classes.

What is SOAP protocol in PHP?

SOAP stands for Simple Object Access Protocol. SOAP is an application communication protocol. SOAP is a format for sending and receiving messages. SOAP is platform independent.


1 Answers

Getting SOAP working usually does not require compiling PHP from source. I would recommend trying that only as a last option.

For good measure, check to see what your phpinfo says, if anything, about SOAP extensions:

$ php -i | grep -i soap 

to ensure that it is the PHP extension that is missing.

Assuming you do not see anything about SOAP in the phpinfo, see what PHP SOAP packages might be available to you.

In Ubuntu/Debian you can search with:

$ apt-cache search php | grep -i soap 

or in RHEL/Fedora you can search with:

$ yum search php | grep -i soap 

There are usually two PHP SOAP packages available to you, usually php-soap and php-nusoap. php-soap is typically what you get with configuring PHP with --enable-soap.

In Ubuntu/Debian you can install with:

$ sudo apt-get install php-soap 

Or in RHEL/Fedora you can install with:

$ sudo yum install php-soap 

After the installation, you might need to place an ini file and restart Apache.

like image 183
ghbarratt Avatar answered Oct 13 '22 06:10

ghbarratt