php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36615 SSL fsockopen and stream_socket_client takes too long
Submitted: 2006-03-05 05:10 UTC Modified: 2006-04-10 12:58 UTC
From: georgechianrs at gmail dot com Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.1.2 OS: Windows
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
11 + 8 = ?
Subscribe to this entry?

 
 [2006-03-05 05:10 UTC] georgechianrs at gmail dot com
Description:
------------
 When using SSL fsockopen and stream_socket_client takes 1.7 seconds to return on WIndows. This seems to be a huge improvement from php-5.0 where it used to take 6.3 to 8.7 seconds for fsockopen to return. The problem occurs only when using ssl, and for tcp connections the speeds are comparable to that on linux.
 
 Also the the delay occurs only in the first call in a script, and later calls takes the same time 0.02 seconds, which is again same as that on linux.

These are the times for fsockopen on windows and linux:

TCP:
 linux:  0.003 seconds
 windows: 0.003 seconds

 SSL:
 linux: 0.02
 Windows: php-5.0: 8.2 seconds
 Windows: php-5.1: 1.2 seconds

 

 Thanks.
 George.


Reproduce code:
---------------
 <?php

 fsockopen("ssl://localhost", "443");



Expected result:
----------------
 Should return in 0.02 seconds for ssl. 

Actual result:
--------------
 Takes too long. For php5.0 the time used to increase when the script becomes larger. This seems to have got solved with php-5.1.

 IN php-5.1 fsockpen("ssl://localhost") takes 1.2 seconds. Which is around 50 times slower than expected.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-10 12:58 UTC] sniper@php.net
Glad that it got better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 01:01:27 2024 UTC