Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

JHttpTransportSocket timeout #1142

rredpoppy opened this Issue Apr 10, 2012 · 4 comments


None yet
3 participants

JHttp calls from the request method do not set a timeout, thus leaving the timeout with the default value. In JHttpTransportSocket, this implicit timeout is null and it's used in the connect method.

For some reason, somewhere in this file, I get a connect timeout error. Curl wrapper seems to work fine, though. The error is a fatal exception 'Connection timeout'

Example code that throws the exception:

        $transport = null;
        $transportWrappers = array('JHttpTransportCurl', 'JHttpTransportStream', 
        $options = new JRegistry();
        while (!$transport && $transportWrappers)
                $wrapper = array_shift($transportWrappers);
                $transport = new $wrapper($options);                
            catch (Exception $e){
        $http = new JHttp($options, $transport);
        $getData = array('something'=>'else');
        $url = 'http://www.exmple.com';
        $response = $http->get($url, $getData);

elinw commented May 28, 2012

Are you using ssl?
I think https://github.com/joomla/joomla-platform/blob/staging/libraries/joomla/http/transport/socket.php#L243 should be handling but there seems to be a php bug if it is ssl
Can you check default_socket_timeout in your environment?


elinw commented Nov 28, 2012

Any update on this?


eddieajau commented Apr 5, 2013

I'm sorry but we aren't accepting issues for this repository any more. Please see http://developer.joomla.org/cms/report-an-issue.html for how to report and issue for the CMS Platform.

@eddieajau eddieajau closed this Apr 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment