Recently we had a customer request soap be enabled for our PHP5 configuration. At first I was thinking why isn’t it enabled in the first place there must be a good reason. It turns out there was in fact no reason not to have it enabled and it was not there due to the fact our php5 shares the same configuration as our PHP4. The problem with this is PHP4 does not contain a SOAP module so obviously was not in the configure.
So how did I enable it? Well luckily for me we had just recently upgraded to PHP 5.2.3 so all our builds were still sitting there. So all I had to do was navigate to our PHP builds directory and run the following few commands
./configure –prefix=/usr/local/php5 –exec-prefix=/usr/local/php5 –program-suffix=5 –with-xml –with-mm –enable-bcmath –enable-calendar –with-curl –with-dom –with-dom-xslt –with-dom-exslt –enable-exif –with-swf=/usr/local/flash –enable-ftp –with-gd –with-jpeg-dir=/usr/local –with-png-dir=/usr –with-xpm-dir=/usr/X11R6 –with-gettext –with-imap –with-imap-ssl –with-kerberos –enable-mbstring –enable-mbstr-enc-trans –enable-mbregex –with-mcrypt –with-mhash –enable-magic-quotes –with-mm –with-mysqli –with-mysql=/usr –with-snmp –enable-ucd-snmp-hack –with-openssl –enable-discard-path –with-pear –with-pspell –enable-sockets –enable-track-vars –with-ttf –with-freetype-dir=/usr –enable-gd-native-ttf –enable-versioning –enable-wddx –with-xmlrpc –with-zip –with-zlib –enable-force-cgi-redirect –enable-discard-path –enable-soap
This sets up the configuration and after that all I had to do was run make install to actually create the new PHP5 install. But It wasn’t all done I have to copy the php5 cgi file into a directory that the web server can make use of. So one last commands of
cp -f /usr/local/php5/bin/php-cgi5 /usr/local/cpanel/cgi-sys/php5
I had just now setup PHP 5.2.3 with soap in all of just 5 minutes. The customer who requested this sure was impressed and I was glad I could help 🙂 . So if you ever need a php5 module installed always try asking support as our PHP5 is outside of cPanel control so we can a load all sorts of modules which are a big pain in php4 due to cPanel.