That is really the question. I’m running PHP 5.2.9 on Apache and can’t upgrade it. Is it possible to enable SOAP in PHP 5.2.9? When the PHP documentation mentioned, “To enable SOAP support, configure PHP with —enable-soap,” it didn’t assist at all. How do I set it up?
Asked by netrox
In most cases, getting SOAP to operate does not necessitate compiling PHP from source. That is something I would only try as a last resort.
Check to see whether your phpinfo contains any information regarding SOAP extensions for good measure:
$ php -i | grep -i soap
to make sure it’s the PHP extension that isn’t installed.
If you don’t notice anything regarding SOAP in your phpinfo, look into what PHP SOAP packages are available.
You can use the following search terms in Ubuntu/Debian:
$ apt-cache search php | grep -i soap
or use the following search terms in RHEL/Fedora:
$ yum search php | grep -i soap
php-soap and php-nusoap are the two most used PHP SOAP packages. php-soap is normally what you get when you configure PHP with —enable-soap.
You can use the following commands to install in Ubuntu/Debian:
$ sudo apt-get install php-soap
You may also use the following command to install under RHEL/Fedora:
$ sudo yum install php-soap
You may need to create an ini file and restart Apache after the installation is complete.
Answered by ghbarratt
If you have Ubuntu installed on your computer, the methods below will assist you:
Answered by Noha Salah
As for your question, there’s not much you can do if activating from.ini isn’t enough and you can’t upgrade PHP. Some, but not all, modules can be added without recompiling (zypper install php5-soap, yum install php-soap). Install some PEAR classes for interpreted SOAP support if that isn’t enough (NuSOAP, etc.).
The double-dash —switches are intended to be used when recompiling PHP from the ground up.
You would download the PHP source package (as a compressed.tgz tarball, for example), expand it somewhere, and then run the configuration script, for example under Linux.
./configure --prefix ...
phpinfo can provide the configure command used by your PHP (). It should give you an exact copy of the PHP you now have installed if you repeat it exactly. When —enable-soap is added, SOAP will be enabled in addition to everything else.
However, if you are unfamiliar with PHP recompilation, you should avoid it. It also requires a number of ancillary libraries that you may or may not have – freetype, gd, libjpeg, XML, expat, and so on (it’s not enough that they’re installed; they must be a developer version, i.e. with headers and so on; in most distributions, having libjpeg installed might not be enough, and you may need libjpeg-dev as well).
For recompilation, I need to keep a separate virtual computer with everything installed.
Answered by LSerni
Post is based on https://stackoverflow.com/questions/11584426/how-do-i-enable-enable-soap-in-php-on-linux