function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AdamJonesAdamJones 

'Error Fetching http headers' msgs using PHP Soap client on Windows PC

I'm trying to connect to SF via the PHP toolkit soap client.    The PC is running PHP via IIS.   

The same code and credentials work fine on our live server but via Windows I just get 'Error Fetching http headers' errors on the initial connect.  

 

Any advice ?

AbhishekAbhishek (Salesforce Developers) 
Adam,

We do a SOAP call and sometimes end up with a SOAP fault 'error fetching HTTP headers'. ... Simple explanation of why this can happen is if you have a default_socket_timeout setting of x seconds on your application and the remote SOAP server takes more than x seconds to answer

Try the workaround as mentioned below for the solution,

http://php.blogaboutwhatever.com/2011/11/error-fetching-http-headers/#:~:text=We%20do%20a%20SOAP%20call,'error%20fetching%20http%20headers'.&text=Simple%20explanation%20why%20this%20can,than%20x%20seconds%20to%20answer.



For further reference check this too (https://stackoverflow.com/questions/9403486/error-fetching-http-headers-in-soapclient).


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
AdamJonesAdamJones
Hi I don't believe it's this.   The default_socket_timeout  value is already a  huge 60 seconds.   Any other ideas ?
AbhishekAbhishek (Salesforce Developers) 
That's it adam I don't have other options.