my zend app is working fine on my local server but when i upload all the file to my main webserver, the following code throws this error:
Exception information:
Message: Unable to Connect to tcp://stage.mydomain.com:80. Error #0: php_network_getaddresses: getaddrinfo failed: Name or service not
i’m using an this zend function:
$this->_http = new Zend_Http_Client();
$this->_http->setUri('http://staging.mydomain.com/jserver');
$this->_http->setMethod(Zend_Http_Client::POST);
$this->_http->setRawData(json_encode($this->_apirequest));
echo $this->_http->request()->getBody();
this works on my local when i change the URI to my.local/jserver
oh yeh, maybe this could be the problem… to access the staging.mydomain.com i have to change my hosts file for windows.. so the browser redirects to that ip.
not sure.
you are right. remote server knows nothing about your hosts file. try to use ip, not the domain name