Enable SOAP on a MediaTemple DV server

MediaTemple’s DV server is an excellent choice if you need to host multiple sites, resell hosting, or just need more power than shared hosting can provide.  However one key feature is missing out of the box required for utilizing web services.  PHP must be compiled with SOAP (for you to use Magento‘s web services for example).

You will first need root SSH access which can be enabled via MT’s  “Root Access & Developer Tools” in the Account Center.  Note: enabling SSH is a potential security risk so make sure you use a strong password (updated 4/25/17) or you can also try the generator here: http://comparitech.net/password-strength.  Note: I have no affiliation with either of these sites, the key is to always use unique, strong passwords for your accounts.

Open your terminal (use putty or just use Terminal.app in OSX), and SSH into your server using root.

  1. Navigate to a relatively unimportant directory. I chose /home/
    cd /home/
  2. Download PHP
    wget http://www.php.net/get/php-5.2.6.tar.gz/from/us.php.net/mirror
  3. Unpack the PHP file
    tar -zxf php-5.2.6.tar.gz
  4. Configure the new PHP to enable SOAP (will take a few minutes) (before enable is two dashes)
    cd php-5.2.6
    ./configure --enable-soap=shared
  5. Rebuild PHP (this will also take a while)
  6. Copy just the SOAP module into your existing installation of PHP
    cp modules/soap.so /usr/lib/php/modules/
  7. Add the new SOAP configuration to your existing configuration
    echo "extension=soap.so" > /etc/php.d/soap.ini
  8. Restart Apache
    /etc/init.d/httpd restart
  9. Optional: You can now delete /home/php-5.2.6/ if you’d like, as you won’t need it any longer.
    rm -rf /home/php-5.2.6/
  10. Check phpinfo() to confirm that SOAP is now enabled.

These instructions were originally posted here.

1 comment

Leave a comment