-
Notifications
You must be signed in to change notification settings - Fork 215
Could not connect to host #74
Comments
Same problem for me, any idea @metadaddy ? |
I ended up doing something like that, which fixed it
|
@jeromegv I left Salesforce about 18 months ago and am no longer working on this. Not sure who owns this now - maybe @ReidCarlberg? |
@jeromegv thanks for your answer, I'll try the code. |
@jeromegv Thanks for the code. Spent a few hours until I stumble upon your answer. All happen after updating PHP version. Had other problems (not SalesForce) because of "verify_peer" settings. Thanks again! |
Hi , right now I am facing problem that PHP is not able to connect to the HOST. Best Regards, |
I am pretty sure the HTTP connection simply failed, it happens. Could be SF, could be the requesting server, could be the network, a simple timeout due to congestion. You will need to detect it, and re-run your request. An example of this is Guzzle's retry-subscriber. |
It's worth pointing out that @jeromegv 's response is very helpful, but it disables TLS security effectively as no certificate verification is done (making it vulnerable to MITM attacks). This may be okay in development environments but worth careful consideration for code that will be used in production. |
Hi, sometimes that I try to connect to Salesforce I have this error:
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /Force/soapclient/SforceBaseClient.php:168 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://login.s...', '', 1, 0) #1 Force/soapclient/SforceBaseClient.php(168): SoapClient->__call('login', Array) #2 Force/soapclient/SforceBaseClient.php(168): SoapClient->login(Array) #3 /home/donahoy/public_html/sincroniza/sincroniza.php(12): SforceBaseClient->login('universe...', '...') #4 {main} thrown in /Force/soapclient/SforceBaseClient.php on line 168
The text was updated successfully, but these errors were encountered: