phpzend-frameworklocalhostzend-rest

Unable to Connect error with Zend_Rest_Client on localhost


I am using Zend_Rest_Client to connect Zend_Rest_Server, everything seems to be alright, but when I try to get() from the server I recieve this error:

Zend_Http_Client_Adapter_Exception: Unable to Connect to tcp://localhost:80. Error #10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\www\zf_1_72\library\Zend\Http\Client\Adapter\Socket.php on line 148

here is code, which I use

$client = new Zend_Rest_Client('http://localhost/my_application/api/index/');       
$client->auth($key);
$result = $client->get();

thank's for any advice


Solution

  • This thread suggetss the issue may be with the 'localhost' name - try using 127.0.0.1 instead.