In Wamp server (locally) my code works, but in my web server on Centos 6 the script doesn't work. Why? I have read lot's of answers, but didn't find the solution.
Couldn't load from 'https://example.com/WEBService/SearchService.svc/wsdl?wsdl': failed to load external entity "https://example.com/WEBService/SearchService.svc/wsdl?wsdl"
private $_wsdl_uri = 'https://example.com/WEBService/SearchService.svc/wsdl?wsdl';
private static $_soap_client = false;
private static $_inited = false;
public function init(&$errors)
{
if(!self::$_inited)
{
try
{
if (self::$_soap_client = @new SoapClient($this->_wsdl_uri, array('soap_version' => SOAP_1_1)))
self::$_inited = true;
}
catch (Exception $e)
{
$errors[] = 'Error here '.$e->getMessage();
return false;
}
}
return self::$_inited;
}
php -m | grep -i soap
soap
openssl installed.