SoapClient Error after enabling FedEx Shipping Method on Magento Ecommerce Solution

In this tutorial I will explain how to fix the SoapClient error and why it happened. My server threw this error after enabling the FedEx shipping option in Magento running 1.7. I isolated the issue to the FedEx shipping option because every time I enabled FedEx the shopping cart. The next step was to check the Magento error logs which gave me the errors below.

2012-10-19T03:57:53+00:00 ERR (3): Warning: include(SoapClient.php): failed to open stream: No such file or directory  in /var/www/vhosts/www.domain.com/httpdocs/lib/Varien/Autoload.php on line 93
2012-10-19T03:57:53+00:00 ERR (3): Warning: include(SoapClient.php): failed to open stream: No such file or directory  in /var/www/vhosts/www.domain.com/httpdocs/lib/Varien/Autoload.php on line 93
2012-10-19T03:57:53+00:00 ERR (3): Warning: include(): Failed opening 'SoapClient.php' for inclusion (include_path='/var/www/vhosts/www.domain.com/httpdocs/app/code/local:/var/www/vhosts/www.domain.com/httpdocs/app/code/community:/var/www/vhosts/www.domain.com/httpdocs/app/code/core:/var/www/vhosts/www.domain.com/httpdocs/lib:.:')  in /var/www/vhosts/www.domain.com/httpdocs/lib/Varien/Autoload.php on line 93

First I’ll explain why it happened. The reason for my SoapClient error was the php-common and php-soap extensions were at a different version than my PHP installation itself.
PHP was at version 5.3.3 and php-common and php-soap were at 5.3.17. So it’s important to make sure that the PHP extension versions are compatible with the PHP version.

Secondly I’ll explain how to fix this issue. It was extremely easy.
*Note:  There is always the potential that an update may break your site make sure you have a backup in place and ready to go before completing this process!
I simply ran the following command. I knew the PHP version was old compared to the extensions so this updates the PHP installation.

yum update php

After updating the PHP restart Apache by running the following command.

service httpd restart

Refresh the website and verify the checkout works properly.

If you have questions feel free to email [email protected] or leave a comment below.

Share this Story
Load More Related Articles
Load More By Nick Escobedo
Load More In How-To's

Check Also

Understanding Trade-offs as a Developer

Trade-offs are one of the most important aspects ...