# Navigate to a relatively unimportant directory. I chose /home/
cd /home/

# Download PHP (http://www.php.net/releases/)
wget http://museum.php.net/php5/php-5.2.6.tar.gz

# 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)

# 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.