我试图在我们的服务器上安装 Wordpress 进行测试,但为了做到这一点,我必须将我们当前的 PHP 版本升级到 5.3。我升级了我们的 PHP,现在我发现我们的 Purolator 运输模块不再工作。根据我们的主机支持,“purolator.php”文件缺少新版本 PHP 所需的数据。不幸的是,我无法恢复我们的 PHP 版本并且我们的程序员不在了。
这是我从我们的网站托管支持团队获得的错误消息:
tail /var/www/vhosts/phantomcables.com/statistics/logs/error_log -f
[Thu Jul 19 08:34:28 2012] [error] [client 70.51.168.201] PHP Fatal
error: Class 'SoapClient' not found in
/var/www/vhosts/phantomcables.com/httpdocs/shippings/purolator.php on line
49, referer: https://phantomcables.com/index.php?dispatch=checkout.cart
这些是第 40 到 72 行:
function createPWSSOAPClient()
{
/** Purpose : Creates a SOAP Client in Non-WSDL mode with the appropriate authentication and
* header information
**/
//Set the parameters for the Non-WSDL mode SOAP communication with your Development/Production credentials
//echo DIR_SHIPPING_FILES."estimatingservice.wsdl";
$url = "https://webservices.purolator.com/PWS/V1/Estimating/EstimatingService.asmx";
$client = new SoapClient( DIR_SHIPPING_FILES."estimatingservice.wsdl",
array (
'trace' => true,
'location' => $url,
'uri' => "http://purolator.com/pws/datatypes/v1",
'login' => PRODUCTION_KEY,
'password' => PRODUCTION_PASS
)
);
//Define the SOAP Envelope Headers
$headers[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1', 'RequestContext',
array (
'Version' => '1.0',
'Language' => 'en',
'GroupID' => 'xxx',
'RequestReference' => 'Rating Example'
)
);
//Apply the SOAP Header to your client
$client->__setSoapHeaders($headers);
return $client;
}
任何帮助将不胜感激。