I'm using PHP SoapClient to fetch details from a soap api, it works perfectly before, then suddenly it stops working and giving me this error: (with a status of 200 OK)
{
"faultstring": "Error Fetching http headers",
"faultcode": "HTTP"
}
This is my code: (that runs perfectly before)
$client = new SoapClient($wsdl, array("trace"=>1, "exceptions"=>0));
Things I've tried:
disabling keep_alive
'keep_alive' => 0
increasing timeout from php.ini
default_socket_timeout = 6000
increasing timeout from php code
ini_set('default_socket_timeout', 6000);
disabling wsdl cache from php.ini
soap.wsdl_cache_enabled=0
tried compression header
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE
But no luck
Don't know what I'm missing
Thanks for the help
My machine:
PHP: PHP 7.2.15-0ubuntu0.18.04.1
Apache: Apache/2.4.29 (Ubuntu)