I recently upgraded to a dv 3.5 from Media Temple for a project, but found that PHP was not configured with the SOAP extension needed for the site. With some help from the lovely Media Temple support people, here’s what I did to get it working without having to completely reinstall PHP.
Disclaimer: These instructions worked for me on a dv 3.5; it may not work for other dv packages.
Checking your current PHP installation
You can use phpinfo()
to check your PHP installation and see whether or not the extension you need is already installed. If it’s not listed, it’s worth checking the PHP documentation to see how it suggests installing it. In my case, the SOAP extension is only available if PHP was configured with the –enable-soap option.
Getting SOAPy!
You will need to compile the SOAP shared module and add it to the existing PHP configuration. To do this, you’ll need to make sure you’ve installed the dv 3.5 Developer Tools. To do this, go to your Account Center, select your domain, find Root Access & Developer Tools and hit install.
Open up a terminal and SSH into your server. If you don’t know how to do this, read up on getting SSH access to your server.
- You’ll need to grab the latest PHP source code. Download it to somewhere convenient, like the home directory:
cd ~
wget http://php.net/get/php-5.2.5.tar.gz/from/us.php.net/mirror
- Decompress the tarball:
tar -zxf php-5.2.5.tar.gz
- Move into the source directory and configure PHP with SOAP enabled (this may take a few minutes):
cd php-5.2.5
./configure –enable-soap=shared
- Run the build (again, this may take a few minutes):
make
When that’s done, you can optionally test the build, which threw errors for me, but it all worked nonetheless:
make test
- Copy the SOAP module into the existing PHP installation:
cp modules/soap.so /usr/lib/php/modules/
- Add the SOAP module to the PHP configuration:
echo “extension=soap.so” > /etc/php.d/soap.ini
- Restart Apache:
/etc/init.d/httpd restart
- Tidy up by deleting the files we downloaded, e.g.:
cd ~
rm -rf php-5.2.5*
The SOAP module should now be loaded and ready to rock; you can check using phpinfo()
again.
22 Responses to “Configuring PHP 5 with SOAP on Media Temple dv 3.5”
I actually came across the need to do this today. When you spoke to MT, did you discuss any impact this modification has on the UOP? I know they can drop support if you start messing around with PHP and just wanted to make sure there were no issues. I’ll def. contact them, but came across this first so just wanted to know. Thanks.
Hi – No, we didn’t specifically discuss the UOP (Update Option Program). It’s definitely worth asking them about that; I guess a fresh PHP install could wipe out the SOAP module.
Usually, neither your php.ini nor the modules directory are touched by a UOP update. You should be fine with this solution.
According to Media Temple’s Update Option Program FAQs, you should be able to make changes to php.ini, vhosts.conf and my.cnf without causing problems with the UOP. I’d expect that the same goes for the extension config files in /etc/php.d/. You just need to avoid using httpd.include as Plesk will often overwrite this file.
Excellent – thank you for this. I used this specifically for the php5 upgrade š
Thank you so much! I needed exactly this: am running dv 3.5 on MT.
Entered everything here verbatim- no problems.
If you’re doing a lot of SOAP stuff with PHP you might be interested in WSF/PHP it makes a lot of stuff easy to use.
Thanks, exactly what I needed.
awesome, thanks a million for this concise doc!
worked like a charm.
=)
This tutorial worked great, thank you!
Thanx it works :-)! Alternately, I skipped step #8 and kept my secondary PHP installation around and in step #5 created a symbolic link to the Soap module. This way I can make other tweaks/additions to my PHP build in this same fashion if I need to.
thanks a lot , saved me huge headaches..
MT should have this on their KB
Cheers! Worked perfectly!
Wow – I don’t have any server admin experience, but it all worked perfectly! I simply typed in the instructions verbatim on my new (dv).
Thanks for sharing, J.
Thanks for publishing this guide which worked for us. I wonder why mt doesn’t have this in their knowledge base, though.
+1 ran commands exactly
+1 worked perfectly
+1 satisfied pseudo experienced system admin.
Correct me if I’m wrong, but this isn’t actually installing PHP 5.2.5, right? It’s just building the source and then copying the soap module into the existing PHP installation, right? I started this using the latest version of PHP (5.2.8), but then realized you weren’t actually executing make install.
Hi James – Yup, like I said, “without having to completely reinstall PHP”. š
Thanks Jon, I guess Mike from comment #5 is blissfully unaware that he hasn’t actually upgraded PHP then. Thanks for the post.
will this work on (dv) 4.0
the PHP Version is 5.3.5
and im not that familiar on how to configure the server
I don’t have a (dv) 4 to play with, but to my knowledge, these steps should work for PHP 5 with any version of the (dv). If you want to be sure, I would raise a ticket with the friendly MediaTemple support team.
Thanks for this! I’ve been searching for exactly this info and it worked perfectly.