Problem when using PEAR/SOAP at Drupal 6.15
Hi all,
Mọi người ơi, giúp giùm
Mình có tạo một module mới, trong đó có class mới và include file SOAP/Client.php.
Khi chạy trên môi trường window thì OK, không bị lỗi gì cả, nhưng khi chạy trên môi trường LINUX thì nó vẫn gọi được cái phương thức trong class, tuy nhiên song song đó, trong report từ bên admin vẫn thấy báo lỗi "
"include_once() [function.include]: Failed opening 'SOAP/Client.php' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhosts/savingcall/sites/all/modules/mydrupalwebsite/includes/mywebservice.php on line 3."
Không hiểu tại sao luôn, mặc dù vẫn chạy được mà vẫn bị báo lỗi
Nội dung file "mywebservice.php" như sau
<?php
include_once 'SOAP/Client.php';
class mywebservice
{
var $wsclient;
function mywebservice(){
$wsdl_url = "http://localhost/MyService1.asmx?wsdl";
ini_set( 'soap.wsdl_cache_enabled', false );
ini_set( 'soap.wsdl_cache_ttl', 0 );
$this->wsclient = new SoapClient($wsdl_url, array('exceptions' => 1,'connection_timeout'=>3600));
}
function authenticate($phone_number, $password)
{
$result = $this->wsclient->Authenticate(array("phone"=>$phone_number, "password"=>$password));
if (is_soap_fault($result)) {
trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_USER_ERROR);
}else{
return $result->AuthenticateResult;
}
}
}
?>
Unsigned version
Comments
Bạn vui lòng nhập tiếng Việt
Bạn vui lòng nhập tiếng Việt có dấu.
Thanks,
Thế Hồng
Post new comment