PHP: Enable SOAP with PHP5 on Media Temple's DV 3.5

I started trying to learn Magento’s API today, which requires the use of SOAP. I know that SOAP is a part of PHP5, however, I guess it doesn’t often come enabled on a lot of servers. I have a DV with Media Temple, and after running phpinfo(), I saw that SOAP definitely wasn’t configured.

The following instructions will guide you through adding the SOAP to your previous installation of PHP. In my case, I had PHP 5.2.6 installed, so – note that when you are downloading the PHP source files – you should probably try and stick with the version you currently have.

Install Media Temple’s Developer Tools

You will need the developer tools installed to compile PHP. So, login to your Media Temple account center, select your primary domain, find the “Root Access & Developer Tools”. Install the developer tools if you haven’t already. It may take up to 5-10 minutes, so be patient.

Make sure you have enabled root access as well, as you will need this to be able to compile the PHP

Download & Compile PHP

Open your terminal, and ssh into your server using root.

  1. Navigate to a relatively unimportant directory. I chose /home/
    cd /home/
  2. Download PHP
  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/ /usr/lib/php/modules/
  7. Add the new SOAP configuration to your existing configuration
    echo "" > /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.

    This should not effect Media Temple’s update option program, in the case where you would like to up update your server later on.

    Special thanks to dotjay for initially pointing this all out.

This entry was posted in PHP. Bookmark the permalink.

24 Responses to PHP: Enable SOAP with PHP5 on Media Temple's DV 3.5

  1. Omar says:

    Can anybody please help. I installed it the way you had mentioned but it’s not working for me. I’m a newbie at this I ran the install then ran pear list and this is what I get:

    PHP Warning: Module ‘soap’ already loaded in Unknown on line 0
    Installed packages, channel
    Package Version State
    Archive_Tar 1.3.11 stable
    Console_Getopt 1.3.1 stable
    PEAR 1.9.4 stable
    Structures_Graph 1.0.4 stable
    XML_Util 1.2.1 stable

  2. Aimbot black op 2 says:

    I think this is one of the most significant information for me.
    And i’m glad reading your article. But wanna remark on few general things, The site style is perfect, the articles is really excellent : D. Good job, cheers

  3. Anupam says:

    Thank you so much. This was really helpful and to the point.

  4. Shashi Lo says:

    I found the (mT) wiki page, but this was so much better. It guided me to install SOAP exactly the way I needed.

    Thanks Prattski!

  5. I had to use:


    to wget that version of PHP. The link above has expired.

  6. Mark Kolb says:

    Thanks for this.

  7. Rob says:

    Hey Josh Thanks a million for this post. I’ve been banging my head against the wall and finding that MT support is really useless. This worked perfectly!

  8. Ben says:

    Looks like older versions of PHP have been moved. PHP 5.2.6 can be found at:

  9. jaydjay says:

    great tips. the world is capable of good

  10. neeth says:

    thank you very much for sharing this information. It works fine for me. If some one got problem in wget then check with this page. ( Use the any of the link to install. works for me

  11. Laura says:

    THANK YOU! This was exactly what I needed. Perfectly clear instructions. I was up a creek without a paddle before I found this.

  12. Jason says:

    Are web services interrupted at any point during this install/update? I figure at least during the restart…

  13. Justin says:

    Thanks for posting this. It worked like a charm for me.

  14. v2theg says:

    Thanks for the easy to read article. Asked (mt) about doing this and they pointed me here.

    • Josh Pratt says:


      Glad you could find it useful. So, Media Temple pointed you to my blog eh? Interesting… You would think they would put it in their knowledge base.

  15. Pingback: Enable SOAP on MediaTemple DV server (and likely other hosts as well)

  16. Sarah German says:

    Cyberspace… what a small world! Excellent post, Josh 2.0 – I had to enable SOAP today to get a Drupal module working, and these directions were spot-on. Seeya out there!

  17. ron says:

    really helpful–thanks!

    (and in case anyone else is as dim as me, in addition to enabling root access, you have to bash login as root of the main domain account.)

  18. Josh Pratt says:

    Glad you all could find this useful! Thanks for the comments.

  19. I always find myself coming back to this article, thanks again!

  20. Bill says:

    exactly what I was looking for – thanks very much!

    Few things that might help others:

    Older php versions can be found here:

    Be careful in step 4 – I missed the bit about 2 dashes and just copied and pasted the line which obviously didn’t work as planned.

    If you make a mistake with step 4 like I did, cd back one directory, delete the php-5.2.6 directory and unpack the archive again. I found if I ran configure multiple times inside the one directory strange stuff happened.

    Thanks again

  21. JJ Borja says:

    Awesome! I was bashing my head for an hour or so before I found this. Worked great tanks for the post.

  22. Riley Dutton says:

    Wow, I was literally looking to enable SOAP on my MT (dv) 3.5 server today to do exactly the same thing — use the Magento API. Small world. Thanks for the tips!