Bug #41631 [Com]: default_socket_timeout does not work with SSL

From: Date: Fri, 24 Oct 2014 12:12:38 +0000
Subject: Bug #41631 [Com]: default_socket_timeout does not work with SSL
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188285@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=41631&edit=1

 ID:                 41631
 Comment by:         software-php at interfasys dot ch
 Reported by:        david at acz dot org
 Summary:            default_socket_timeout does not work with SSL
 Status:             Re-Opened
 Type:               Bug
 Package:            OpenSSL related
 Operating System:   *
 PHP Version:        5.2, 5.3, 5.4, 5.5, 5.6
 Assigned To:        rdlowrey
 Block user comment: N
 Private report:     N

 New Comment:

@rick, try the patch. It applies cleanly on 5.5.18


Previous Comments:
------------------------------------------------------------------------
[2014-10-24 11:48:56] rick at webambition dot nl

We have the same SoapClient SSL issue as fredrik but the PHP version we're on is 5.5.18 (dotdeb
on wheezy). The response body is truncated / cut-off around 7000~7999 bytes. 

On PHP 5.5.17 we had connection timeouts but those were fixed by 5.5.18.

------------------------------------------------------------------------
[2014-10-20 10:44:44] software-php at interfasys dot ch

@fredrik, the patch applies cleanly on 32 and 34 (xp_ssl.c is the same). Forget 33, it's
broken.

It's great news if it works for you. That means we're one step closer to having a 100%
working solution.

A good thing the SSLv3 will be backported as well given the recent news about poodle :)

------------------------------------------------------------------------
[2014-10-20 09:29:03] fredrik dot eriksson at loopia dot se

I'm not sure if I understand you correctly, but:

* applying the patch against 5.4.32 works fine, and the problem is not reproducable on the patched
php.
* the patch does not apply cleanly against 5.4.33, I didn't bother to try to make it apply
since I don't think that would help much.

* when building 5.4.32 with xp_ssl.c from 5.4.33 I see the same problem on 5.4.32

------------------------------------------------------------------------
[2014-10-17 18:22:30] askalski at synacor dot com

Does the attached patch (ssl_read_timeout-5.4.32.patch) help with the SoapClient issue?

------------------------------------------------------------------------
[2014-10-17 06:40:29] fredrik dot eriksson at loopia dot se

I have a problem with SOAP over SSL after the fix in 5.4.33 on FreeBSD. 5.4.32 works fine, but this
test case does not work in 5.4.33:


$client = new SoapClient('test.wsdl', array('cache_wsdl' => WSDL_CACHE_NONE,
'trace' => true, 'exceptions' => false, 'connection_timeout'
=> 15));
$data = $client->get_long_soap_response_over_https($param);

echo "__getLastRequest:\n";
echo $client->__getLastRequest();
echo "\n\n__getLastRequestHeaders:\n";
echo $client->__getLastRequestHeaders();
echo "\n\n__getLastResponse:\n";
echo $client->__getLastResponse();


After the timeout the output for last request and last request headers looks fine, but the response
is truncated after a certain size. I didn't save the failed output, but the expected response
size was 76800 bytes (+ header), but was truncated I think around 72000 bytes. The same test done
over http or with 5.4.32 works fine, so I can only assume that the "fix" for this bug is
causing this.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=41631


--
Edit this bug report at https://bugs.php.net/bug.php?id=41631&edit=1


Thread (67 messages)

« previous php.bugs (#188285) next »