I've Googled everywhere but no one has posted a solution, they all say to set the timeout in the config but how do you do this?
How do I reset/override this setting from my XMLRPC client or server?
Here is what I'm trying:
$server = new Zend_XmlRpc_Client('http://127.0.0.1/xmlrpc');
$client = $server->getProxy();
// Increasing the timeout
$client->setConfig(array('timeout'=>30));
Here is the error:
Fatal error: Uncaught exception 'Zend_XmlRpc_Client_FaultException'
with message 'Method "setConfig" does not exist'
in /usr/share/php/libzend-framework-php/Zend/XmlRpc/Client.php:370
Trying to pass as arg:
$server = new Zend_XmlRpc_Client('http://127.0.0.1/xmlrpc', array('timeout'=>30));
Here is the error:
Catchable fatal error: Argument 2 passed to
Zend_XmlRpc_Client::__construct() must be an
instance of Zend_Http_Client
Found the solution and here it is:
$server = new Zend_XmlRpc_Client('http://127.0.0.1/xmlrpc');
// Get the HTTP Client used by the XMLRPC client
$http_client = $server->getHttpClient();
// Increasing the HTTP timeout
$http_client->setConfig(array('timeout'=>30));
$client = $server->getProxy();
One Line works for me as well:
$server = new Zend_XmlRpc_Client('http://127.0.0.1/xmlrpc');
// Get the HTTP Client used by the XMLRPC client and increasing the HTTP timeout
$server->getHttpClient()->setConfig(array('timeout'=>30));
$client = $server->getProxy();