+ Start a Discussion

Integration error - cannot connect to host

We are using the Salesforce API with PHP to connect using the WSDL downloaded from the Salesforce instance and an error is received that it could not connect to host test.salesforce.com. This is not a login failure, as that would get a different error and we can run this same code from a different network and gain access.

The error seems to be that enterprise.soap.sforce.com does not have a DNS entry that it can resolve to find the host IP. Are there any modifications we can make to the WSDL or the environment to allow our system to successfully find enterprise.soap.sforce.com? We know this isn't a firewall issue and we know this works from a network that can successfully resolve the enterprise.soap.sforce.com address.

Given that, I'd say we're looking for what could be changed to allow this to function given the lack of DNS resolution. Could we replace the reference to enterprise.soap.sforce.com with an IP address in the WSDL or add an entry to the HOSTS file?
Best Answer chosen by E
VinayVinay (Salesforce Developers) 

Can you check if you need to connect to production instance.

Review below links and snippet which can help you.


Vinay Kumar