![]()
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.
- Navigate to a relatively unimportant directory. I chose /home/
cd /home/ - Download PHP
wget http://www.php.net/get/php-5.2.6.tar.gz/from/us.php.net/mirror - Unpack the PHP file
tar -zxf php-5.2.6.tar.gz - 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 - Rebuild PHP (this will also take a while)
make - Copy just the SOAP module into your existing installation of PHP
cp modules/soap.so /usr/lib/php/modules/ - Add the new SOAP configuration to your existing configuration
echo "extension=soap.so" > /etc/php.d/soap.ini - Restart Apache
/etc/init.d/httpd restart - 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/ - 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.

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!
Awesome! I was bashing my head for an hour or so before I found this. Worked great tanks for the post.
exactly what I was looking for – thanks very much!
Few things that might help others:
Older php versions can be found here: http://www.php.net/releases/
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
I always find myself coming back to this article, thanks again!
Glad you all could find this useful! Thanks for the comments.
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.)
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!
Pingback: Enable SOAP on MediaTemple DV server (and likely other hosts as well)
Thanks for the easy to read article. Asked (mt) about doing this and they pointed me here.
v2theg,
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.
Thanks for posting this. It worked like a charm for me.
Are web services interrupted at any point during this install/update? I figure at least during the restart…
Jason – I’m not sure.
THANK YOU! This was exactly what I needed. Perfectly clear instructions. I was up a creek without a paddle before I found this.
thank you very much for sharing this information. It works fine for me. If some one got problem in wget http://www.php.net/get/php-5.2.6.tar.gz/from/us.php.net/mirror then check with this page. (http://www.filewatcher.com/m/php-5.2.6.tar.gz.12046184.0.0.html). Use the any of the link to install.
http://www.filewatcher.com/m/php-5.2.6.tar.gz.12046184.0.0.html works for me
great tips. the world is capable of good
Looks like older versions of PHP have been moved. PHP 5.2.6 can be found at:
http://museum.php.net/php5/php-5.2.6.tar.gz
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!
Thanks for this.
I had to use:
wget http://museum.php.net/php5/php-5.2.6.tar.gz
to wget that version of PHP. The link above has expired.
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!
Thank you so much. This was really helpful and to the point.