Zend_http_client failed to connect when setParameterPost is used
Hi,
I am a newbie in zend framework. I developed an application which connects to second application which is also build in zend framework for authentication. The code looks like this
include_once 'Zend/Http/Client.php';
$this->_kioskClient = new Zend_Http_Client( $app_url . '/authenticator');
$this->_kioskClient->setCookieJar()->setParameterPost('username', 'admin')->setParameterPost('password', 'admin');
try{
$response = $this->_kioskClient->request('POST');
} catch (Zend_Exception $e){
$this->_error[] = $e->getMessage();
}
When I run this code, the app show an error "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". But when i took off the setParameterPost('username', 'admin') and setParameterPost('password', 'admin'), it works. But authentication wont work as there is no username and password.
My system is running vista and firefox3. Funny thing is, this app is running in a machine with WinXp and firefox2. When I ported this to vista machine the app failed. Not sure if this happened because of another vista security issue.
If anyone had encountered this problem, or have a solution to this please let me know.
Thanks in advance.
Last edited by sendecruz : 06-29-2008 at 09:06 AM.
Reason: correction
|