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.
Assuming you do not see anything about SOAP in the phpinfo, see what PHP SOAP packages might be available to you.
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
After the installation, you might need to place an ini file and restart Apache.
Answered by ghbarratt
If you have Ubuntu installed on your computer, the methods below will assist you:
Answered by Noha Salah
As far as your question goes: no, if activating from .ini is not enough and you can’t upgrade PHP, there’s not much you can do. Some modules, but not all, can be added without recompilation (zypper install php5-soap, yum install php-soap). If it is not enough, try installing some PEAR class for interpreted SOAP support (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 display the re 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).
I have to keep a separate virtual machine with everything installed for my recompilation purposes.
Answered by LSerni
Post is based on https://stackoverflow.com/questions/11584426/how-do-i-enable-enable-soap-in-php-on-linux