Configure PHP with SOAP


  • Applies to: DV 4.0
    • Difficulty: Medium
    • Time Needed: 60
    • Tools Required: SSH, root, Developer Tools
  • Applies to: DV
    • Difficulty: Medium
    • Time Needed: 60
    • Tools Required: SSH, root, Developer Tools
  • Applies to: Grid
    • Difficulty: Easy
    • Time Needed: 0
    • Tools Required: None

Overview

Good news! PHP on the Grid comes pre-configured with SOAP! You don't need to do anything to install it!

For more information on SOAP and its purpose, please go here

Below you'll find instructions on how to enable SOAP on a DV 4.0DV server. For more information on SOAP and its purpose, please go here.

These instructions are specific to PHP 5.3.5.5.4.13 If you're not running that version of PHP, you'll need to alter the instructions to accommodate your specific version.

READ ME FIRST

This guide is provided as a courtesy. (mt) Media Temple does NOT support the installation and/or configuration of third-party software on your DV server 4.0DV server. We strongly encourage you to back up your service before making any changes. Click here to read about DV backup options.

CloudTech_ProductPage_217x57

CloudTech Can Help!

If you're having trouble with the steps in this article, additional assistance is available via CloudTech, our premium services division. Our expert engineers can tweak and tune your server for optimal performance. For more information on what CloudTech can do for you, please click here.


Requirements

Before you start, you'll need the following:

  • Your root user must be enabled. Click here for details.
  • You must have the "Developer Tools" installed on your DV server. Click here for instructions on that.

Instructions

  1. Log into your server with a root or sudo user via SSH.
  2. Next, you'll need to use "wget" to grab the PHP source code. Again, these instructions specific to PHP 5.3.5.5.4.13; if you're using some other version of PHP on your server, you'll need to grab the appropriate package.

    cd ~
    wget http://museum.php.net/php5/php-5.3.5.tar.gzwget http://museum.php.net/php5/php-5.4.13.tar.gz
  3. The source code is downloaded as a compressed "tarball", so you'll need to decompress and unarchive the file:

    tar -zxf php-5.3.5.tar.gzphp-5.4.13.tar.gz
  4. Move into that directory:

    cd php-5.3.5php-5.4.13
  5. Next, configure your PHP installation to include SOAP:

    ./configure --enable-soap=shared

    NOTE:

    If you receive an error similar to the following, you will need to install libxml2:

    error: xml2-config not found. Please check your libxml2 installation

    You can install libxml2 through the yum repository:

    yum install libxml2-devel
  6. Now, you run the build.

    make
  7. Next, copy the SOAP module into the existing PHP installation.

    
    cp modules/soap.so /usr/lib64/php/modules
  8. Add the SOAP module to the PHP configuration.

    
    echo "extension=soap.so" >> /etc/php.d/soap.ini
  9. Then, restart the Apache web server.

    
    /etc/init.d/httpd restart
  10. Move back to the root directory:

    cd ~
  11. You'll probably want to clean up by removing the files you downloaded earlier.

    
    rm -rf php-5.3.5php-5.4.13*

That's it! Barring any unforeseen complications, your PHP installation should now be able to utilize the SOAP module.